Curated resource guide

WordPress Coding Standards and Code Quality

Keep large WordPress codebases consistent, reviewable, and easier to change. The selected resources cover official coding standards, PHPCS, static analysis, JavaScript and CSS tooling, architecture, automated formatting, security checks, documentation, backward compatibility, and pragmatic quality controls for plugins and themes.

Scope

What this guide covers

  • WordPress PHP, JavaScript, CSS, HTML and documentation standards
  • PHPCS and WordPress Coding Standards
  • PHPStan/Psalm static analysis
  • ESLint, Stylelint and Prettier
  • Composer
  • autoloading
  • namespaces
  • dependency injection
  • object-oriented design
  • procedural WordPress patterns
  • code organization
  • type declarations
  • strictness tradeoffs
  • security linting
  • complexity
  • dead code
  • test coverage
  • Git hooks
  • automated formatting
  • code review
  • backward compatibility
  • deprecated APIs
  • documentation
  • and maintaining quality in large plugins/themes

Selected references

Curated resources

Links open the original publisher so you can use the complete, current material in context.

  1. 02
    5

    WordPress PHP Coding Standards

    Apply WordPress-specific PHP formatting, naming, control-structure, database, and security conventions.

    developer.wordpress.org
  2. 03
    5

    WordPress JavaScript Coding Standards

    Keep JavaScript readable and consistent with the conventions used across WordPress projects.

    developer.wordpress.org
  3. 04
    5

    WordPress CSS Coding Standards

    Use the project conventions for selectors, properties, values, structure, and documentation.

    developer.wordpress.org
  4. 05
    5

    WordPress HTML Coding Standards

    Review valid, semantic, accessible markup conventions expected in WordPress code.

    developer.wordpress.org
  5. 06
    5

    WordPress Inline Documentation Standards

    Document PHP and JavaScript APIs in the formats used by WordPress tooling and references.

    developer.wordpress.org
  6. 07
    5

    WordPress Coding Standards for PHPCS

    The canonical PHPCS ruleset for enforcing WordPress PHP conventions and catching common quality problems in CI.

    github.com