What Each Rule Means
Every finding is produced by one rule. This article lists all 14 rules in version 1.0.0, grouped by the change they cover. The detail page for a plugin shows the same Why it matters and How to fix text and links to the official developer note.
Iframed editor (WordPress 7.1)#
Editor script queries the canvas through the global document#
- Severity: High. Confidence: High. Runs on: editor scripts only.
- What it finds:
document.querySelector(…),querySelectorAllorgetElementsByClassNamecalls whose selector targets canvas elements (.editor-styles-wrapper,.is-root-container,.block-editor-block-list__layout,.block-editor-block-list__block,.block-editor-writing-flow,.wp-block…). - Why it matters: Since 7.1 the post editor canvas is always an iframe. The global
documentis the admin page, so this selector returns nothing or the wrong elements. - Fix: Get the canvas document from an element inside it (
element.ownerDocument/defaultView), or useuseRefEffecton a block ref.
Editor script uses jQuery on canvas elements without the iframe document#
- Severity: High. Confidence: High. Runs on: editor scripts only.
- What it finds: Single-argument
jQuery('…')or$('…')calls whose selector targets canvas elements. - Why it matters: A single-argument jQuery call searches the admin page, not the editor iframe, so nothing is found.
- Fix: Pass the canvas document as the context,
$( '.wp-block', canvasDocument ), or drop jQuery and use a block ref.
Editor stylesheet only reaches the canvas through the deprecated compatibility copy#
- Severity: Medium. Confidence: High. Runs on: editor stylesheets whose handle does not start with
wp-. - What it finds: CSS rules with
.editor-styles-wrapperor.wp-block…selectors in a stylesheet that is enqueued onenqueue_block_editor_assets, which loads outside the iframe. - Why it matters: WordPress 7.1 still copies such stylesheets into the canvas, but logs a console warning; the copy is a back-compat path that will go away.
- Fix: Enqueue canvas styles on
enqueue_block_assets(insideis_admin()), viablock.jsoneditorStyle/style, or withadd_editor_style().
Editor stylesheet never reaches the canvas because its handle starts with wp-#
- Severity: High. Confidence: High. Runs on: editor stylesheets whose handle starts with
wp-. - What it finds: The same canvas selectors as the rule above, but in a stylesheet whose handle begins with
wp-. - Why it matters: WordPress copies editor stylesheets into the canvas only when the handle does not start with
wp-, so these rules never apply at all. - Fix: Enqueue the stylesheet on
enqueue_block_assetsor throughblock.json, and give it a handle that does not start withwp-.
Block registers apiVersion below 3#
- Severity: Low. Confidence: Medium. Runs on:
block.jsonfiles (one per block name). - What it finds:
"apiVersion": 1or2, or noapiVersionat all (which defaults to 1; the finding says so). - Why it matters: Before 7.1 a single apiVersion 1/2 block kept the post editor out of the iframe. In 7.1 it is iframed anyway, so this block has probably never been tested in an iframe.
- Fix: Set
"apiVersion": 3and test the block in the iframed editor.
List tables (WordPress 7.1)#
CSS targets the old list-table row markup (th.check-column or td title cells)#
- Severity: Medium. Confidence: High. Runs on: every CSS file.
- What it finds: Selectors such as
th.check-column,td.column-title,td.page-title,td.column-primary,td .row-title,td .row-actions,td .post-state. - Why it matters: In 7.1
WP_List_Tablerenders the checkbox cell astd.check-columnand the primary (title) cell asth scope="row". These selectors no longer match. - Fix: Drop the element qualifier (
.check-column,.column-title) or use:is(td, th).column-titleto support old and new markup.
Script selects the old list-table row markup (th.check-column or td title cells)#
- Severity: Medium. Confidence: Medium. Runs on: every JS file.
- What it finds: String selectors in scripts that look for the checkbox in a
thor the title in atd, includingth input[type=…]. - Why it matters: Bulk-action and quick-edit scripts that rely on the old markup find nothing on 7.1 list tables.
- Fix: Select
.check-column inputand.column-primarywithout an element qualifier.
Editor components (WordPress 7.1)#
Passes the deprecated size prop to a 40px-default component#
- Severity: Low. Confidence: Medium. Runs on: script bundles.
- What it finds: A
sizeprop passed toBorderBoxControl,BorderControl,FontSizePickerorToggleGroupControl, in JSX or compiledcreateElementcalls. - Why it matters: In 7.1 these controls are always 40px and the
sizeprop does nothing, so a control sized for a compact layout renders larger. - Fix: Remove the
sizeprop (and anysize="__unstable-large"); adjust the surrounding layout if it relied on the smaller size.
Passes __next40pxDefaultSize, which no longer does anything#
- Severity: Info. Confidence: High. Runs on: script bundles.
- What it finds: Any use of
__next40pxDefaultSize. - Why it matters: Since 7.1 all affected controls are 40px tall. The prop is ignored, and passing
falseno longer gives a 36px control. - Fix: Remove the prop. If a layout depended on 36px controls, adjust it.
Meta boxes#
Meta box declares itself incompatible with the block editor#
- Severity: Medium. Confidence: High. Status: shipped (since WordPress 5.0). Runs on: meta boxes recorded by the runtime check.
- What it finds: A meta box registered with
__block_editor_compatible_meta_box => false(and without__back_compat_meta_box => true). Core meta boxes are ignored. - Why it matters: The block editor shows a notice instead of the box’s fields. Editors lose this feature unless they switch to the classic editor.
- Fix: Ask the vendor for a block editor version (a sidebar panel using post meta registered with
show_in_rest), or a newer release that drops the flag.
Classic meta box will turn off real-time collaboration on this post type#
- Severity: Medium. Confidence: High. Status: upcoming. Runs on: meta boxes recorded by the runtime check.
- What it finds: Any plugin or theme meta box shown in the block editor that does not pass
__rtc_compatible_meta_box => trueor__back_compat_meta_box => true. Core meta boxes are ignored. The finding lists every post type the box appears on and the file and line of its render callback. - Why it matters: Classic meta boxes are not synced between editors, so collaboration is disabled on any post that shows one.
- Fix: Move the fields to registered post meta (
show_in_rest) with a block editor panel, or, if the box is safe, pass'__rtc_compatible_meta_box' => truein theadd_meta_box()callback arguments. That flag is proposed and may change.
React 19 (upcoming)#
Bundles React 18’s jsx-runtime instead of the WordPress external#
- Severity: High. Confidence: High. Status: upcoming. Runs on: script bundles.
- What it finds: The React 18 internal
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwnerreference that a bundledjsx-runtimeleaves in a build. - Why it matters: A bundled React 18
jsx-runtimebuilds element objects that React 19 rejects, which is the main reason the React 19 upgrade was reverted from 7.1. - Fix: Rebuild with a current
@wordpress/scriptssoreact/jsx-runtimemaps to theReactJSXRuntimeexternal (wp-react-jsx-runtime).
Class component uses string refs#
- Severity: Medium. Confidence: Medium. Status: upcoming. Runs on: script bundles.
- What it finds: Reads of
this.refs.name. - Why it matters: React 19 removes string refs. Core plans a compatibility polyfill, so this may keep working for a while.
- Fix: Replace
ref="name"withcreateRef()or a callback ref.
Assigns defaultProps, which React 19 ignores on function components#
- Severity: Info. Confidence: Low. Status: upcoming. Runs on: script bundles.
- What it finds: Assignments to
.defaultProps. - Why it matters: React 19 drops
defaultPropsfor function components (class components keep it), and core plans a compatibility layer. The scanner cannot tell which kind of component this is, so treat it as a pointer only. - Fix: For function components, use default values in parameter destructuring:
function Card( { size = "m" } ).
Was this article helpful?
Tell us what was missing
