بنقرة واحدة
code-review
Security and WordPress coding standards code review for PHP, JavaScript/TypeScript, or CSS.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Security and WordPress coding standards code review for PHP, JavaScript/TypeScript, or CSS.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Add a WordPress AJAX handler to a plugin, with nonce verification, input sanitisation, and JSON response.
Register a block pattern in a theme or plugin, using the WordPress 6.0+ file-based pattern system.
Add a new Gutenberg block to an existing plugin or theme.
Register a WP-CLI command in a plugin using a command class, following Dekode conventions.
Add a WordPress action or filter hook to a plugin or theme.
Scaffold a new must-use plugin in packages/mu-plugins/ - either a simple utility or a service-class integration.
| name | code-review |
| description | Security and WordPress coding standards code review for PHP, JavaScript/TypeScript, or CSS. |
Review the specified WordPress code against this project's standards, WordPress best practices, and security requirements.
If the user specifies files or a PR, review those. Otherwise, review the current uncommitted changes.
declare( strict_types=1 ); present in every PHP file.composer.json PSR-4 map.var_dump, print_r, or debug output left in.$_GET / $_POST / $_REQUEST reads sanitised with sanitize_text_field(), absint(), sanitize_email(), etc.check_ajax_referer or wp_verify_nonce).esc_html, esc_attr, esc_url, wp_kses_post).$wpdb->prepare() used for all queries with user data.wp_check_filetype_and_ext().eval(), system(), exec(), shell_exec() or equivalent.add_action / add_filter calls are in a hooks() method, not scattered across constructors or global scope.register_activation_hook / register_deactivation_hook called in the plugin bootstrap file (not inside a hooked callback).plugin-slug / theme-slug declared in the file header.__(), _e(), esc_html__(), or similar.echo of untrusted data — even inside esc_* calls check if the source is trustworthy.wp_safe_redirect() used over header('Location: ...').wp_die() used over die() / exit() in WP context.'value' === $variable.composer.json autoload map.get_post_meta in a loop without pre-fetching).wp_cache_get / wp_cache_set used for expensive or repeated queries.posts_per_page never set to -1 in production queries — cap at a reasonable number.import { ... } from 'react' — must use @wordpress/element.__experimental or __unstable WordPress API imports — @wordpress/no-unsafe-wp-apis is enforced.window.wp global — always import from @wordpress/* packages.@wordpress/*) before internal (./, ../).save() function is pure and deterministic.useBlockProps() applied to the root element in both Edit and save.InspectorControls / BlockControls used for settings, not custom sidebars.@wordpress/api-fetch used for REST calls, not fetch() directly.apiFetch middleware, not as a query string.block.json asset manifest (.asset.php) used for enqueue dependencies.console.log left in production code.__() from @wordpress/i18n.alt text (or alt="" if decorative).<label> elements.__(), _e(), _n(), _x() with correct text domain.sprintf().@wordpress/i18n (__, _n, _x, sprintf).theme.json or _variables.scss.breakpoint() mixin.!important except in explicit utility classes.Report issues grouped by severity:
Critical (must fix before merge — security or data loss risk) Major (should fix — bugs, missing WP patterns, accessibility) Minor (nice to fix — style, performance hints) Praise (note what is done well)
For each issue, include: file path, line number (if known), description, and a suggested fix.