PHPackages                             infinum/eightshift-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. infinum/eightshift-coding-standards

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

infinum/eightshift-coding-standards
===================================

Eightshift WordPress Coding Standards

3.0.1(2mo ago)1785.2k↓23.2%3[1 PRs](https://github.com/infinum/eightshift-coding-standards/pulls)2MITPHPPHP &gt;=7.4CI failing

Since Jul 7Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/infinum/eightshift-coding-standards)[ Packagist](https://packagist.org/packages/infinum/eightshift-coding-standards)[ Docs](https://github.com/infinum/eightshift-coding-standards)[ RSS](/packages/infinum-eightshift-coding-standards/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (41)Used By (2)

[![image](https://repository-images.githubusercontent.com/96307889/1ff5645a-63b3-476f-925a-5f37c2599f6e)](https://repository-images.githubusercontent.com/96307889/1ff5645a-63b3-476f-925a-5f37c2599f6e)

[![Latest Stable Version](https://camo.githubusercontent.com/b9f39882ac933be0e1b40b7f848dd3310ba042cec87b2fc672abe8ef9f3e4a92/68747470733a2f2f706f7365722e707567782e6f72672f696e66696e756d2f656967687473686966742d636f64696e672d7374616e64617264732f762f737461626c65)](https://packagist.org/packages/infinum/eightshift-coding-standards)[![Release Date of the Latest Version](https://camo.githubusercontent.com/690664f6ac11f43227385d2f84e7616c9507aaa95684003d8077c7a738656ed1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f696e66696e756d2f656967687473686966742d636f64696e672d7374616e64617264732e7376673f6d61784167653d31383030)](https://github.com/infinum/eightshift-coding-standards/releases)

[![CI checks](https://github.com/infinum/eightshift-coding-standards/actions/workflows/ci.yml/badge.svg)](https://github.com/infinum/eightshift-coding-standards/actions/workflows/ci.yml)

[![Minimum PHP Version](https://camo.githubusercontent.com/40dacb1b4288f4ed41966363051e9d004ecad72133e7d0a8e6a983d89e366139/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696e66696e756d2f656967687473686966742d636f64696e672d7374616e64617264732e7376673f6d61784167653d33363030)](https://packagist.org/packages/infinum/eightshift-coding-standards)[![Tested on PHP 7.4 to 8.3](https://camo.githubusercontent.com/56850c7cb6d4c730807276c1c366cd797ad01c3fef5e96263908281478582a8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7465737465642532306f6e2d253230372e34253230253743253230382e30253230253743253230382e31253230253743253230382e32253230253743253230382e332d677265656e2e7376673f6d61784167653d32343139323030)](https://github.com/infinum/eightshift-coding-standards/actions/workflows/ci.yml)

[![License: MIT](https://camo.githubusercontent.com/52db12f5460835054365cae0aca1c4341746d99b44682cb5d9d4b0f7256ff9f8/68747470733a2f2f706f7365722e707567782e6f72672f696e66696e756d2f656967687473686966742d636f64696e672d7374616e64617264732f6c6963656e7365)](https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/fe3973372616a128a56c1534d97482667bc91be24bc615b4c6b18b4b8fe34a4d/68747470733a2f2f706f7365722e707567782e6f72672f696e66696e756d2f656967687473686966742d636f64696e672d7374616e64617264732f646f776e6c6f616473)](https://packagist.org/packages/infinum/eightshift-coding-standards/stats)

Eightshift Coding Standards for WordPress
=========================================

[](#eightshift-coding-standards-for-wordpress)

This package contains [Eightshift Coding Standards for WordPress](https://handbook.infinum.co/books/wordpress) for [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/). The intention of this package is to have a unified code across the WordPress projects we do at Eightshift, and to help with the code review.

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

[](#installation)

### Composer

[](#composer)

Composer install is simple. Just run

`composer require infinum/eightshift-coding-standards`

or add to your `composer.json`

```
"require-dev": {
  "infinum/eightshift-coding-standards": "^2.0"
}
```

Copy and modify the configuration file into your project (from the project root)

```
cp vendor/infinum/eightshift-coding-standards/phpcs.xml.dist.sample phpcs.xml.dist
```

Then, run the following command to run the standards checks in your project:

```
vendor/squizlabs/php_codesniffer/bin/phpcs
```

You can also selectively check files or directories by specifying them.

### Recommendation

[](#recommendation)

It's recommended that you install a Composer plugin that will handle the registration of standards with PHP\_CodeSniffer.

- [phpcodesniffer-composer-installer](https://github.com/PHPCSStandards/composer-installer)

Working in IDE
--------------

[](#working-in-ide)

### Sublime Text 3

[](#sublime-text-3)

To make the sniff work in Sublime Text 3, you need to have sublime linter set up, and add [phpcs linter](https://github.com/SublimeLinter/SublimeLinter-phpcs).

Then in your settings you need to reference the path to the coding standards. It should look something like this

```
"paths": {
    "linux": [],
    "osx": [
        "${project}/vendor/bin/",
        "/Users/user_name/wpcs/vendor/bin"
    ],
    "windows": []
},
```

The path depends on where you've installed your standards. Then in the linters user settings you'll need to add in the `linters` key

```
"phpcs": {
    "@disable": false,
    "args": [],
    "excludes": [],
    "standard": "Eightshift"
},
```

Or set the `standard` to point to the phpcs.xml.dist in your root folder (**preferred method**)

```
"phpcs": {
    "@disable": false,
    "args": [],
    "excludes": [],
    "standard": "$folder/phpcs.xml.dist"
},
```

#### Note about global installation

[](#note-about-global-installation)

In your `wpcs` folder, when adding Eightshift folder. You can clone this repository there, be sure to comment out the `` part, so that your sniffer won't go looking for that folder.

### Visual Studio Code

[](#visual-studio-code)

To set up phpcs in your VSCode, use [vscode-phpcs](https://github.com/ikappas/vscode-phpcs/) extension. Once installed in the user settings set

```
"phpcs.enable": true,
"phpcs.standard": "Eightshift",
```

This will look in your project's vendor folder for the Eightshift's WordPress Coding Standards, and run the sniffs on every save. You can see the issues in the Problems tab at the bottom.

### Atom

[](#atom)

To set up phpcs in the Atom editor, you need to install a couple of packages. First install the base linter package for Atom: [linter](https://atom.io/packages/linter). Upon completion you will be prompted to install its dependency [linter-ui-default](https://atom.io/packages/linter-ui-default). After that install [linter-phpcs](https://atom.io/packages/linter-phpcs).

In `linter-phpcs` package settings you can set the path to previously installed `phpcs` or allow the package to search for `phpcs` executable inside your project. Also, you must set the name of the standard: `"Eightshift"` or path to the `ruleset.xml` of Eightshift's WordPress Coding Standards. We recommend you to disable searching for configuration files because that can cause some other standards to be used instead.

In config.cson linter-phpcs settings can look like this:

```
# If you want to use phpcs executable available in project
"linter-phpcs":
  autoConfigSearch: false
  codeStandardOrConfigFile: "Eightshift"
  disableWhenNoConfigFile: true

# If you want to use specific phpcs executable
"linter-phpcs":
  autoConfigSearch: false
  autoExecutableSearch: false
  codeStandardOrConfigFile: "Eightshift"
  disableWhenNoConfigFile: true
  executablePath: "/Users/user_name/wpcs/vendor/bin/phpcs" #For Mac users
  executablePath: "path_to_composer/vendor/bin/phpcs.bat" # For Windows users

# If you want to use specific standard
"linter-phpcs":
  autoConfigSearch: false
  codeStandardOrConfigFile: "vendor/infinum/eightshift-coding-standards/Eightshift/ruleset.xml"
  disableWhenNoConfigFile: true
```

Credits
-------

[](#credits)

Eightshift WordPress Coding Standards are maintained and sponsored by [Infinum](https://www.infinum.com).

License
-------

[](#license)

Eightshift WordPress Coding Standards are Copyright © 2023 Infinum. This is free software, and may be redistributed under the terms specified in the LICENSE file.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance84

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 93.7% 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 ~95 days

Recently: every ~347 days

Total

34

Last Release

82d ago

Major Versions

0.4.3 → 1.0.02020-09-18

1.6.0 → 2.0.0-beta2023-09-22

2.0.0-beta → 3.0.02024-05-20

PHP version history (6 changes)0.1.0PHP &gt;=5.4.0

0.4.0PHP &gt;=5.6

0.4.2PHP &gt;=7.1

1.0.0PHP &gt;=7.2

1.1PHP ^7.2

2.0.0-betaPHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bbf5d68008a40dd09df7de61b7f06de29163885ca93e8b9706574aadc07ff12?d=identicon)[dingo-d](/maintainers/dingo-d)

![](https://www.gravatar.com/avatar/75e8c41a7bd5e452e4b6b8dbbcb0c7f2a2eca117ee7c2dc1bbd4a100cc9494ce?d=identicon)[infinum](/maintainers/infinum)

---

Top Contributors

[![dingo-d](https://avatars.githubusercontent.com/u/8638515?v=4)](https://github.com/dingo-d "dingo-d (239 commits)")[![jrfnl](https://avatars.githubusercontent.com/u/663378?v=4)](https://github.com/jrfnl "jrfnl (8 commits)")[![iruzevic](https://avatars.githubusercontent.com/u/23283324?v=4)](https://github.com/iruzevic "iruzevic (5 commits)")[![iobrado](https://avatars.githubusercontent.com/u/23059501?v=4)](https://github.com/iobrado "iobrado (2 commits)")[![goranalkovic-infinum](https://avatars.githubusercontent.com/u/77000136?v=4)](https://github.com/goranalkovic-infinum "goranalkovic-infinum (1 commits)")

---

Tags

eightshiftopen-sourcephpcs-linterwordpressstandardsphpcswordpressEightshift

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/infinum-eightshift-coding-standards/health.svg)

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

###  Alternatives

[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[automattic/vipwpcs

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

25510.2M145](/packages/automattic-vipwpcs)[wptrt/wpthemereview

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

217736.5k29](/packages/wptrt-wpthemereview)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

496.8M42](/packages/woocommerce-woocommerce-sniffs)[mayflower/mo4-coding-standard

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

17508.3k5](/packages/mayflower-mo4-coding-standard)[phpcompatibility/phpcompatibility-all

A set of rulesets for PHP\_CodeSniffer to check for PHP cross-version compatibility issues and opportunities to modernize code in PHP projects.

1361.7k](/packages/phpcompatibility-phpcompatibility-all)

PHPackages © 2026

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