PHPackages                             automattic/phpcs-neutron-ruleset - 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/phpcs-neutron-ruleset

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

automattic/phpcs-neutron-ruleset
================================

A PHPCS meta-ruleset for WordPress development

v3.4.0(5y ago)17100.3k↓39.7%5[1 issues](https://github.com/Automattic/phpcs-neutron-ruleset/issues)4MITPHP ^7.0 || ^8.0

Since Dec 20Pushed 3y ago5 watchersCompare

[ Source](https://github.com/Automattic/phpcs-neutron-ruleset)[ Packagist](https://packagist.org/packages/automattic/phpcs-neutron-ruleset)[ RSS](/packages/automattic-phpcs-neutron-ruleset/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (17)Used By (4)

Neutron PHP Ruleset
===================

[](#neutron-php-ruleset)

These are a set of modern (PHP &gt;7) linting guidelines for WordPress development. Because of the newer PHP version, it is not suitable for work on Core WordPress, but may be useful for those who are not bound by PHP 5.2.

> **Warning**
>
> **IMPORTANT NOTE:** This project is no longer actively developed. At Automattic we've switched to using the [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) + [VariableAnalysis](https://github.com/sirbrillig/phpcs-variable-analysis).

---

These guidelines are being developed primarily for a team within [Automattic](https://automattic.com/), but anyone is free to use them, suggest changes, or report bugs.

This project is a [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) "standard" (a collection of rules or "sniffs") that can be included in any project.

This is a meta-project in that it's just a collection of rules defined in these packages with certain modifications:

- [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards)
- [VariableAnalysis](https://github.com/sirbrillig/phpcs-variable-analysis)
- [NeutronStandard](https://github.com/Automattic/phpcs-neutron-standard)
- [ImportDetection](https://github.com/sirbrillig/phpcs-import-detection)

Installation
------------

[](#installation)

To use these rules in a project which is set up using [composer](https://href.li/?https://getcomposer.org/), we recommend using the [phpcodesniffer-composer-installer library](https://href.li/?https://github.com/DealerDirect/phpcodesniffer-composer-installer) which will automatically use all installed standards in the current project with the composer type `phpcodesniffer-standard` when you run phpcs.

```
composer require --dev squizlabs/php_codesniffer dealerdirect/phpcodesniffer-composer-installer
composer require --dev automattic/phpcs-neutron-ruleset

```

Configuration
-------------

[](#configuration)

When installing sniff standards in a project, you edit a `phpcs.xml` file with the `rule` tag inside the `ruleset` tag. The `ref` attribute of that tag should specify a standard, category, sniff, or error code to enable. It’s also possible to use these tags to disable or modify certain rules. The [official annotated file](https://href.li/?https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml) explains how to do this.

The following configuration will enable all the sniffs in this ruleset.

```

 My library.

```

Usage
-----

[](#usage)

Most editors have a phpcs plugin available, but you can also run phpcs manually. To run phpcs on a file in your project, just use the command-line as follows (the `-s` causes the sniff code to be shown, which is very important for learning about an error).

```
vendor/bin/phpcs -s src/MyProject/MyClass.php

```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 87.8% 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 ~78 days

Recently: every ~173 days

Total

16

Last Release

1890d ago

Major Versions

v1.9.0 → v2.0.02018-12-05

v2.0.0 → v3.0.02019-04-23

PHP version history (2 changes)v3.2.0PHP ~7.0

v3.4.0PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c17eab4ecec5bcaae35d25bc7bb56358b3d8c2e6e9a3f7e99d480e31260a52a7?d=identicon)[sirbrillig](/maintainers/sirbrillig)

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

---

Top Contributors

[![sirbrillig](https://avatars.githubusercontent.com/u/2036909?v=4)](https://github.com/sirbrillig "sirbrillig (43 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (4 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (1 commits)")[![yoavf](https://avatars.githubusercontent.com/u/844866?v=4)](https://github.com/yoavf "yoavf (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/automattic-phpcs-neutron-ruleset/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-phpcs-neutron-ruleset/health.svg)](https://phpackages.com/packages/automattic-phpcs-neutron-ruleset)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[codeception/module-asserts

Codeception module containing various assertions

8550.6M1.2k](/packages/codeception-module-asserts)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)

PHPackages © 2026

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