PHPackages                             automattic/jetpack-codesniffer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. automattic/jetpack-codesniffer

ActivePhpcodesniffer-standard[Testing &amp; Quality](/categories/testing)

automattic/jetpack-codesniffer
==============================

Jetpack Coding Standards. Based on the WordPress Coding Standards, with some additions.

v7.0.0(5mo ago)297.3k↓26.4%12MITPHPPHP &gt;=8.1CI passing

Since Oct 19Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Automattic/jetpack-codesniffer)[ Packagist](https://packagist.org/packages/automattic/jetpack-codesniffer)[ RSS](/packages/automattic-jetpack-codesniffer/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependencies (10)Versions (32)Used By (2)

Jetpack Coding Standard
=======================

[](#jetpack-coding-standard)

This is a package implementing phpcs sniffs for the Jetpack Coding Standard.

This standard is generally that of WordPress, with a few additions.

Usage
-----

[](#usage)

In your project's `composer.json`, add the following lines:

```
{
    "require-dev": {
        "dealerdirect/phpcodesniffer-composer-installer": "*",
        "automattic/jetpack-codesniffer": "^1"
    }
}
```

Your project must use the default composer vendor directory, `vendor`.

You should then include the Jetpack rules in your `.phpcs.xml.dist`, like

```

```

You will also likely want to set some configuration for other included rulesets:

```

```

Included Standards
------------------

[](#included-standards)

The Jetpack standard includes the following other standards:

- [PHPCompatibilityWP](https://packagist.org/packages/phpcompatibility/phpcompatibility-wp)
- [WordPress-Core, WordPress-Docs, and WordPress-Extra](https://packagist.org/packages/wp-coding-standards/wpcs)
- [VariableAnalysis](https://packagist.org/packages/sirbrillig/phpcs-variable-analysis)
- Selected sniffs from [MediaWiki](https://packagist.org/packages/mediawiki/mediawiki-codesniffer)

Included Sniffs
---------------

[](#included-sniffs)

Custom sniffs defined by this standard are documented in [the docs subdirectory](./docs).

Per-dir Compatibility
---------------------

[](#per-dir-compatibility)

This ruleset is intended to be used with PHPCompatibiity's `testVersion` set to `7.2-`. If used with [automattic/jetpack-phpcs-filter](https://github.com/Automattic/jetpack/blob/trunk/projects/packages/phpcs-filter/)'s per-directory configuration, you may run into a situation where a subdir wants to be compatible down to a later version, but as PHPCompatibiity uses `` for `testVersion` the setting cannot be directly altered per directory.

To assist with this case, we provide additional rulesets that disable PHPCompatibility rules detecting issues that only apply to older versions:

- `` will disable rules detecting issues that only apply to PHP &lt; 7.3.
- `` will disable rules detecting issues that only apply to PHP &lt; 7.4.
- `` will disable rules detecting issues that only apply to PHP &lt; 8.0.
- `` will disable rules detecting issues that only apply to PHP &lt; 8.1.
- `` will disable rules detecting issues that only apply to PHP &lt; 8.2.
- `` will disable rules detecting issues that only apply to PHP &lt; 8.3.
- `` will disable rules detecting issues that only apply to PHP &lt; 8.4.
- `` will disable rules detecting issues that only apply to PHP &lt; 8.5.

Note this isn't a perfect replacement for raising `testVersion`, as it cannot *add* PHPCompatibility rules that do not trigger when `testVersion` indicates support for PHP 7.2. For example, `Jetpack-Compat-74` disables the `PHPCompatibility.Classes.NewTypedProperties.Found` rule ("Typed properties are not supported in PHP 7.3 or earlier") but cannot enable more specific rules like `PHPCompatibility.Classes.NewTypedProperties.UnionTypeFound` ("Union types are not present in PHP version 7.4 or earlier") that would be triggered if `testVersion` were set to `7.4-`.

You may also run into cases where certain subdirectories contain code that is not intended to run under WordPress. We provide additional rulesets to help with this situation as well:

- `` will re-enable rules that PHPCompatibilityWP disables because WordPress provides polyfills for various functions.
- `` includes Jetpack-Compat-NoWP and disables additional rules checking for use of WordPress-provided functions over PHP-native ones.
- `` will disable certain rules that do not make much sense in PHPUnit tests.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance82

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community28

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 55.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~99 days

Recently: every ~118 days

Total

20

Last Release

153d ago

Major Versions

v2.8.0 → v3.0.02024-02-07

v3.0.0 → v4.0.02024-08-29

v4.0.0 → v5.0.02025-01-09

v5.0.0 → v6.0.02025-05-13

v6.0.1 → v7.0.02025-12-16

PHP version history (3 changes)v3.0.0PHP &gt;=7.4

v6.0.0PHP &gt;=8.0

v7.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c5869ecbb8e0eac7e8b8e0f3cf7bdd8d5fcdc4abc10a72281872c53f8639d44?d=identicon)[automattic](/maintainers/automattic)

![](https://www.gravatar.com/avatar/11609890f6e7a840715f4cfc9622d77ea64b7dfc024df5643fbf8471a18c00f3?d=identicon)[kraft](/maintainers/kraft)

![](https://www.gravatar.com/avatar/5326730499ec14e274f51b9bcc39db6aac0fb38b33849715aae0e2587a2b93df?d=identicon)[jeherve](/maintainers/jeherve)

![](https://www.gravatar.com/avatar/6e220e167e341c28b1aa10bf0bb0374999068329f8683d3187ee3cf6749b8837?d=identicon)[dereksmart](/maintainers/dereksmart)

---

Top Contributors

[![anomiex](https://avatars.githubusercontent.com/u/1030580?v=4)](https://github.com/anomiex "anomiex (139 commits)")[![tbradsha](https://avatars.githubusercontent.com/u/32492176?v=4)](https://github.com/tbradsha "tbradsha (24 commits)")[![kraftbj](https://avatars.githubusercontent.com/u/88897?v=4)](https://github.com/kraftbj "kraftbj (22 commits)")[![jeherve](https://avatars.githubusercontent.com/u/426388?v=4)](https://github.com/jeherve "jeherve (15 commits)")[![samiff](https://avatars.githubusercontent.com/u/15803018?v=4)](https://github.com/samiff "samiff (9 commits)")[![zinigor](https://avatars.githubusercontent.com/u/374293?v=4)](https://github.com/zinigor "zinigor (8 commits)")[![coder-karen](https://avatars.githubusercontent.com/u/16754605?v=4)](https://github.com/coder-karen "coder-karen (4 commits)")[![sdixon194](https://avatars.githubusercontent.com/u/33553323?v=4)](https://github.com/sdixon194 "sdixon194 (3 commits)")[![gmjuhasz](https://avatars.githubusercontent.com/u/36671565?v=4)](https://github.com/gmjuhasz "gmjuhasz (3 commits)")[![ice9js](https://avatars.githubusercontent.com/u/8056203?v=4)](https://github.com/ice9js "ice9js (2 commits)")[![simison](https://avatars.githubusercontent.com/u/87168?v=4)](https://github.com/simison "simison (2 commits)")[![manzoorwanijk](https://avatars.githubusercontent.com/u/18226415?v=4)](https://github.com/manzoorwanijk "manzoorwanijk (2 commits)")[![adamwoodnz](https://avatars.githubusercontent.com/u/1017872?v=4)](https://github.com/adamwoodnz "adamwoodnz (1 commits)")[![Initsogar](https://avatars.githubusercontent.com/u/1488641?v=4)](https://github.com/Initsogar "Initsogar (1 commits)")[![markbiek](https://avatars.githubusercontent.com/u/917632?v=4)](https://github.com/markbiek "markbiek (1 commits)")[![millerf](https://avatars.githubusercontent.com/u/790558?v=4)](https://github.com/millerf "millerf (1 commits)")[![nunyvega](https://avatars.githubusercontent.com/u/16329583?v=4)](https://github.com/nunyvega "nunyvega (1 commits)")[![paulopmt1](https://avatars.githubusercontent.com/u/1044309?v=4)](https://github.com/paulopmt1 "paulopmt1 (1 commits)")[![haqadn](https://avatars.githubusercontent.com/u/3737780?v=4)](https://github.com/haqadn "haqadn (1 commits)")[![adimoldovan](https://avatars.githubusercontent.com/u/3854374?v=4)](https://github.com/adimoldovan "adimoldovan (1 commits)")

---

Tags

standardsphpcstestingdevcodesnifferjetpack

### Embed Badge

![Health badge](/badges/automattic-jetpack-codesniffer/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-jetpack-codesniffer/health.svg)](https://phpackages.com/packages/automattic-jetpack-codesniffer)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k123.5M1.8k](/packages/slevomat-coding-standard)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

596161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[wp-coding-standards/wpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress coding conventions

2.7k42.5M1.6k](/packages/wp-coding-standards-wpcs)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[phpcsstandards/phpcsextra

A collection of sniffs and standards for use with PHP\_CodeSniffer.

10224.3M44](/packages/phpcsstandards-phpcsextra)[drupal/coder

Coder is a library to review Drupal code.

3043.6M461](/packages/drupal-coder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
