# PHPCompatibilityWP

> PHPCompatibility ruleset for WordPress projects that skips WordPress's own polyfills

Source: https://talira.ai/catalog/phpcompatibilitywp-12sqwxa2
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: LGPL-3.0-or-later[^2][^3]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [PHPCompatibility](https://talira.ai/orgs/phpcompatibility.md)

PHPCompatibilityWP is a ruleset for [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md) that checks a WordPress-based project for PHP cross-version compatibility. It builds on [PHPCompatibility](https://talira.ai/catalog/phpcompatibility-ptwv532y.md) and excludes the back-fills and polyfills [WordPress](https://talira.ai/catalog/wordpress-2n64j3nh.md) provides, so code that relies on them isn't flagged. Set a testVersion to check both removed and new PHP features against the PHP versions you support.

## Links

- GitHub: https://github.com/PHPCompatibility/PHPCompatibilityWP

## Problems it solves

- check whether my WordPress plugin's PHP code runs on the PHP versions WordPress supports
- stop PHP compatibility checks flagging functions WordPress already polyfills
- lint a WordPress theme for PHP version compatibility before raising the minimum PHP version

## Features

- PHP cross-version compatibility checks for WordPress projects
- excludes polyfills and back-fills WordPress provides, to avoid false positives
- testVersion set per run or in a custom ruleset

## Limitations

- Needs PHP 7.2+, PHP_CodeSniffer 4.0.2+, PHPCompatibility 10+ and PHPCompatibilityParagonie 2+; Composer is the only supported install method.[^1]

## Trust

Overall: 0.43 out of 1.
Signals: maintenance 0.67, adoption 0.47, momentum 0.15, community 0.42, backing 0.30, extensibility 0.00.

- last commit 12 days ago
- 11 commits in the last 90 days
- latest release 2.1.8 13 months ago
- 226 GitHub stars
- 10 contributors
- accepts sponsorship (Github, Github, Open Collective)
- backed by PHPCompatibility

## Related

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

## Alternatives

- [WordPress Coding Standards for PHP_CodeSniffer](https://talira.ai/catalog/wordpress-coding-standards-for-php-codesniffer-598761fd.md): PHP_CodeSniffer rules that enforce WordPress coding conventions
- [PHPCompatibility](https://talira.ai/catalog/phpcompatibility-ptwv532y.md): PHP_CodeSniffer sniffs that check PHP code for cross-version compatibility
- [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

## Sources

[^1]: https://github.com/PHPCompatibility/PHPCompatibilityWP#readme (checked 28 Nov 2026)
[^2]: https://github.com/PHPCompatibility/PHPCompatibilityWP/blob/master/composer.json (checked 28 Nov 2026)
[^3]: https://github.com/PHPCompatibility/PHPCompatibilityWP/blob/master/LICENSE (checked 28 Nov 2026)
