# WordPress Coding Standards for PHP_CodeSniffer

> PHP_CodeSniffer rules that enforce WordPress coding conventions

Source: https://talira.ai/catalog/wordpress-coding-standards-for-php-codesniffer-598761fd
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / linting](https://talira.ai/categories/developer-tools/linting), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [WordPress.org](https://talira.ai/orgs/wordpress-org.md)

WordPress Coding Standards (WordPressCS) is a collection of [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md) rules (sniffs) that check code written for [WordPress](https://talira.ai/catalog/wordpress-2n64j3nh.md) against its official coding conventions. It ships the WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra standards to pick from with phpcs's --standard option or a custom ruleset, many configurable sniffs, and sniffs from PHPCSExtra and PHP_CodeSniffer itself. Since version 3.0 it's installed only with Composer.

## Links

- GitHub: https://github.com/WordPress/WordPress-Coding-Standards

## Problems it solves

- check my WordPress plugin's PHP against the WordPress coding standards
- lint a WordPress theme in CI with phpcs
- enforce WordPress code style in my editor

## Features

- WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra standards
- configurable sniff properties
- includes sniffs from PHPCSExtra and PHP_CodeSniffer
- runs in CI and in editors through phpcs

## Limitations

- Needs PHP 7.2 or newer with the Filter, libxml, Tokenizer and XMLReader extensions.[^1]
- Since version 3.0, installing with Composer is the only supported way.[^1]

## Trust

Overall: 0.57 out of 1.
Signals: maintenance 0.76, adoption 0.69, momentum 0.36, community 0.81, backing 0.30, extensibility 0.00.

- last commit 9 days ago
- 24 commits in the last 90 days
- latest release 3.4.1 4 months ago
- 2.8k GitHub stars
- 102 contributors
- accepts sponsorship (Custom)
- backed by WordPress.org

## Related

- Works with [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md)
- Works with [WordPress](https://talira.ai/catalog/wordpress-2n64j3nh.md)

## Alternatives

- [PHPCompatibilityWP](https://talira.ai/catalog/phpcompatibilitywp-12sqwxa2.md): PHPCompatibility ruleset for WordPress projects that skips WordPress's own polyfills
- [PHP_CodeSniffer Standards Composer Installer Plugin](https://talira.ai/catalog/php-codesniffer-standards-composer-installer-plugin-vpxtv44k.md): Composer plugin that registers installed PHP_CodeSniffer coding standards automatically
- [Stylelint](https://talira.ai/catalog/stylelint-3yp7yn7p.md): A CSS linter that catches errors and enforces conventions in your stylesheets
- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP
- [PHPCompatibility](https://talira.ai/catalog/phpcompatibility-ptwv532y.md): PHP_CodeSniffer sniffs that check PHP code for cross-version compatibility
- [Easy Coding Standard (ECS)](https://talira.ai/catalog/easy-coding-standard-ecs-1f178a34.md): Runs PHP_CodeSniffer and PHP-CS-Fixer rules together, fast

## Sources

[^1]: https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/README.md (checked 28 Nov 2026)
[^2]: https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/LICENSE (checked 28 Nov 2026)
