Skip to content

Add first-class WordPress Plugin Check command - #171

Merged
chubes4 merged 2 commits into
mainfrom
issue-167-plugin-check
May 27, 2026
Merged

Add first-class WordPress Plugin Check command#171
chubes4 merged 2 commits into
mainfrom
issue-167-plugin-check

Conversation

@chubes4

@chubes4 chubes4 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add wordpress.plugin-check as a first-class WP Codebox command backed by the official WordPress Plugin Check plugin.
  • Run Plugin Check through the official wp plugin check WP-CLI command instead of calling Plugin Check internals directly.
  • Respawn WP Codebox runtime commands under Node's JSPI flags on Node 23+ so Playground avoids the Asyncify RuntimeError: unreachable crash triggered by PHPCS/proc_open().
  • Normalize Plugin Check findings and capture raw/normalized Plugin Check artifacts.

Fixes #167.

Root cause

wp plugin check can install and register inside Playground, but the actual check crashes under Playground's Asyncify PHP-WASM build because Plugin Check invokes PHPCS and PHPCS uses proc_open(). WP Codebox imports @wp-playground/cli programmatically, which bypassed the Playground CLI entrypoint's JSPI respawn behavior.

Relevant upstream trackers:

Verification

  • npm run build
  • npm run discovery-command-smoke
  • npm run plugin-check-normalization-smoke
  • npm run check
  • Manual targeted run: npm run wp-codebox -- run --mount ./examples/simple-plugin:/wordpress/wp-content/plugins/simple-plugin --command wordpress.plugin-check --arg plugin-slug=simple-plugin --arg checks=plugin_header_fields --artifacts ./artifacts/plugin-check-command-probe --json
  • Manual full run: npm run wp-codebox -- run --mount ./examples/simple-plugin:/wordpress/wp-content/plugins/simple-plugin --command wordpress.plugin-check --arg plugin-slug=simple-plugin --artifacts ./artifacts/plugin-check-full-command-probe --json

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Investigated the Playground/Plugin Check crash, implemented the JSPI respawn and official WP-CLI Plugin Check path, added smoke coverage, and ran verification. Chris remains responsible for review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add first-class Plugin Check sandbox command

1 participant