Before you submit a theme to WordPress.org — or ship a client theme that should meet the same bar — WP Rig includes an audit suite that simulates the official theme review process. It encodes the Theme Review guidelines into runnable checks, plus a WP-CLI test-data pipeline.
The audit commands
| Command | What it checks |
npm run audit:theme-review | The full simulated review — runs every check below in sequence. |
npm run audit:metadata | style.css header completeness and validity (name, author, version, Tested up to, license). |
npm run audit:banned-files | Files that must not ship in a theme (dev artifacts, build sources, hidden configs). |
npm run audit:plugin-territory | Functionality that belongs in a plugin, not a theme (post types, plugins-style features). |
npm run audit:security-patterns | Escaping, sanitization, and nonces — the security patterns reviewers check by hand. |
npm run audit:remote-resources | External HTTP references (CDN scripts, remote fonts) that violate the self-contained rule. |
npm run audit:theme-check | The Theme Check plugin rule set, runnable from the CLI. |
npm run audit:i18n | Internationalization: text domain consistency, escaping of translatable strings. |
npm run audit:theme-json | theme.json validity and schema conformance. |
npm run audit:html-templates | Block template/part markup validity. |
Each command is also wired into CI — the PHP job runs PHPCS against the WPThemeReview standards, so the official ruleset gates every pull request, not just submission time.
Theme Unit Test data
Reviewers test themes against the official Theme Unit Test data — edge-case posts, nested comments, media, weird titles. WP Rig ships WP-CLI commands to set this up on your local site:
wp rig test-setup # set up the Theme Unit Test environment
wp rig import-test-data # import the official Theme Unit Test dataThe spatial test suite even includes a theme-unit-test stress page audit (see Testing in WP Rig), so layout integrity on pathological content is verified automatically.
Review discipline as a habit
- Run
npm run audit:theme-reviewbefore every release candidate — not the night before submission. - Keep
Tested up toaligned with the supported WordPress version (7.1 as of WP Rig 3.5). - Pair with
composer run-phpcs(WPThemeReview ruleset) and the pre-flightnpm run ai:checkgate. - A theme that passes
audit:theme-reviewlocally rarely surprises a human reviewer.
Related reading
Production Bundling & Exports (the wporg bundle), Testing in WP Rig, and Theme Paradigms (the review branches differ for classic vs block themes).