wordpress-coding-standards

Enforce WordPress PHP coding standards for plugins and themes.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/zenbuapps/zenbu-powers --skill wordpress-coding-standards-zenbuapps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wordpress-coding-standards
Source: https://github.com/zenbuapps/zenbu-powers/tree/main/skills/wordpress-coding-standards
Command: npx skills add https://github.com/zenbuapps/zenbu-powers --skill wordpress-coding-standards-zenbuapps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

WordPress plugin/theme developers and code reviewers often struggle to maintain consistent PHP standards, risking security flaws, inconsistent naming, and fragile codebases.

Core Features & Use Cases

  • Enforces strict_types declaration and direct access protection across all PHP files.
  • Provides consistent naming conventions for classes, methods, variables, constants, and hooks.
  • Promotes safe coding practices including PHPDoc documentation, DTO usage, and Enum replacement.
  • Includes comprehensive guidance for WordPress security (SQL/ XSS/ CSRF), REST API, and WooCommerce compatibility, aiding reviews and development.

Quick Start

Review and implement WordPress PHP coding standards across plugins and themes to ensure security, clarity, and maintainability.

Frequently Asked Questions about wordpress-coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce WordPress PHP coding standards during a plugin code review?

WordPress PHP coding standards are enforced by declaring strict_types, adding direct access protection, applying consistent naming conventions, and generating Traditional Chinese PHPDoc. This ensures plugin and theme codebases remain secure, clear, and maintainable.

What security coding patterns should I check when reviewing WordPress themes?

WordPress theme security coding patterns require validating SQL queries, preventing XSS attacks, and implementing CSRF protections. Enforcing these coding patterns during reviews mitigates vulnerabilities and ensures safe WordPress environments.

Does this coding standard cover WooCommerce compatibility for PHP plugins?

Yes, the WordPress coding standards include comprehensive guidance for WooCommerce compatibility. This ensures PHP plugins integrate safely with WooCommerce environments while maintaining secure coding patterns and architectural standards.

Can I use DTOs and Enums to replace arrays in WordPress plugin development?

Using DTOs and Enums to replace arrays is explicitly promoted by these WordPress coding standards. This practice enforces strict typing, improves data structure clarity, and aligns with modern PHP development workflows.

What are the best practices for PHPDoc documentation in WordPress code reviews?

Best practices for PHPDoc documentation in WordPress code reviews involve writing comprehensive comments in Traditional Chinese. This enforces clear documentation standards for classes, methods, and variables across all plugin and theme files.

Why should I add direct access protection and strict_types to WordPress PHP files?

Adding direct access protection and strict_types to WordPress PHP files prevents direct execution vulnerabilities and enforces strict type checking. This mitigates security risks and reduces fragile codebases in plugin development.