PHPackages                             stellarwp/nexcess-coding-standards - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. stellarwp/nexcess-coding-standards

AbandonedArchivedPhpcodesniffer-standard[PSR &amp; Standards](/categories/psr-standards)

stellarwp/nexcess-coding-standards
==================================

Centralized coding standards for StellarWP packages

v1.0.0(4y ago)31[1 PRs](https://github.com/stellarwp/nexcess-coding-standards/pulls)MITPHPPHP ^5.6 | ^7.0 | ^8.0

Since Apr 12Pushed 2y ago8 watchersCompare

[ Source](https://github.com/stellarwp/nexcess-coding-standards)[ Packagist](https://packagist.org/packages/stellarwp/nexcess-coding-standards)[ RSS](/packages/stellarwp-nexcess-coding-standards/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (0)

StellarWP Coding Standards
==========================

[](#stellarwp-coding-standards)

This package contains a base set of coding standards for StellarWP package development.

The rules are generally based on [the PSR-12 coding standard](https://www.php-fig.org/psr/psr-12/), which is generally recommended within the larger PHP community.

Additionally, since StellarWP is largely-focused on WordPress, our standards also include important WordPress-oriented rules (e.g. late-escaping of output, input sanitization, nonce usage, etc.).

What's included?
----------------

[](#whats-included)

There are two main tools included in this package:

### PHP\_CodeSniffer

[](#php_codesniffer)

[PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) is the de-facto linting tool for PHP, and there are a number of pre-configured standards available.

This package includes PHP\_CodeSniffer itself, along with [the WordPress Coding Standards ruleset](https://github.com/WordPress/WordPress-Coding-Standards), [PHP compatibility checks](https://github.com/PHPCompatibility/PHPCompatibility), and [Dealerdirect's Composer installer for PHP\_CodeSniffer](https://github.com/DealerDirect/phpcodesniffer-composer-installer).

### PHP-CS-Fixer

[](#php-cs-fixer)

[PHP-CS-Fixer](https://cs.symfony.com/) is an additional coding standards checker for PHP, maintained by several members of the Symfony team. It provides a bit more flexibility around more sophisticated checks and experiemental features.

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

[](#installation)

This package should be installed as a development dependency for your project:

```
$ composer require --dev stellarwp/coding-standards
```

This will automatically expose the `phpcs`, `phpcbf`, and `php-cs-fixer` binaries in your project's `vendor/bin` directory.

You may also wish to add the following Composer scripts to make it easier to run checks:

```
# composer.json
{
    // ...
    "scripts": {
        // ...
        "test:standards": [
            "phpcs --standard=StellarWP --cache ./src ./tests",
            "php-cs-fixer fix --config=vendor/stellarwp/coding-standards/src/php-cs-fixer.php -v --diff --dry-run"
        ],
        "test:standards-fix": [
            "phpcbf --standard=StellarWP ./src ./tests",
            "php-cs-fixer fix --config=vendor/stellarwp/coding-standards/src/php-cs-fixer.php -v --diff"
        ]
    },
    "scripts-descriptions": [
        "test:standards": "Check coding standards.",
        "test:standards-fix": "Attempt to fix coding standards violations automatically.",
    ]
}
```

> **Note:** You may need to adjust paths to suit your project, especially if [your Composer "vendor-dir" has been changed](https://getcomposer.org/doc/06-config.md#vendor-dir).

Project-specific configuration
------------------------------

[](#project-specific-configuration)

The default coding standards make a few assumptions about the project (all of which may be overwritten on a per-project basis):

- Code should be compatible with PHP 5.6 or newer (to match [WordPress' minimum requirements](https://wordpress.org/about/requirements/))
- Code should be compatible with the latest and previous major release WordPress (a.k.a. "current minus one")
- Anything passed through [WordPress' internationalization (i18n) functions](https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/) should use the "stellarwp" text domain

Rather than overwriting these values via command-line arguments, it's recommended to create a PHP\_CodeSniffer configuration file in your project. [An annotated starter configuration](src/stubs/phpcs.xml) is included in this package, and can automatically be copied into the project root (`.phpcs.xml.dist`) by running the following command:

```
$ vendor/bin/make-phpcs-config
```

Should you need to change the rules for PHP-CS-Fixer, you may publish a `.php-cs-fixer.dist.php` file by running the following:

```
$ vendor/bin/make-php-cs-fixer-config
```

If you've copied the default `test:standards` and `test:standards-fix` scripts into your `composer.json` file, **please be sure to update their arguments!**

```
# composer.json
{
    // ...
    "scripts": {
        // ...
        "test:standards": [
            "phpcs --cache",
            "php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --diff --dry-run"
        ],
        "test:standards-fix": [
            "phpcbf",
            "php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --diff"
        ]
    },
}
```

License
-------

[](#license)

This library is licensed under the terms of [the MIT license](LICENSE.txt).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.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

Unknown

Total

1

Last Release

1488d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/70a2847a265444714b48c64eceb3ca742baa3a56757ce65b18bd7bbbbf910312?d=identicon)[dpanta94](/maintainers/dpanta94)

![](https://www.gravatar.com/avatar/97fd764aa710e8d8263a7e3b3fececdfd736b8aad8055227bf592ddf50ad15ba?d=identicon)[stellarwp](/maintainers/stellarwp)

---

Top Contributors

[![stevegrunwell](https://avatars.githubusercontent.com/u/233836?v=4)](https://github.com/stevegrunwell "stevegrunwell (20 commits)")[![lkwdwrd](https://avatars.githubusercontent.com/u/1895738?v=4)](https://github.com/lkwdwrd "lkwdwrd (6 commits)")[![borkweb](https://avatars.githubusercontent.com/u/430385?v=4)](https://github.com/borkweb "borkweb (1 commits)")[![bswatson](https://avatars.githubusercontent.com/u/303029?v=4)](https://github.com/bswatson "bswatson (1 commits)")

### Embed Badge

![Health badge](/badges/stellarwp-nexcess-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/stellarwp-nexcess-coding-standards/health.svg)](https://phpackages.com/packages/stellarwp-nexcess-coding-standards)
```

###  Alternatives

[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[infinum/eightshift-coding-standards

Eightshift WordPress Coding Standards

1785.2k3](/packages/infinum-eightshift-coding-standards)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)[redaxo/php-cs-fixer-config

php-cs-fixer config for REDAXO

1091.3k7](/packages/redaxo-php-cs-fixer-config)

PHPackages © 2026

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