PHPackages                             linchpin/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. linchpin/coding-standards

ActivePhpcodesniffer-standard[Utility &amp; Helpers](/categories/utility)

linchpin/coding-standards
=========================

Linchpin Coding Standards

v1.1.6(2mo ago)03.5k↓49.1%[1 issues](https://github.com/linchpin/coding-standards/issues)[7 PRs](https://github.com/linchpin/coding-standards/pulls)GPL-2.0-or-laterPHPPHP &gt;=8.0CI passing

Since Jan 11Pushed 1mo agoCompare

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

READMEChangelog (10)Dependencies (14)Versions (20)Used By (0)

   **Linchpin Coding Standards**
 Slightly opinionated WordPress coding standards for our approach to streamlined engineering and staying on the same page.   [![](https://camo.githubusercontent.com/d70d151ce6eac071e1bf250efed6edc6a8c7fefef0405a92e56013f201612228/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696e636870696e2f636f64696e672d7374616e64617264732e737667)](https://packagist.org/packages/linchpin/coding-standards)     A **[Linchpin](https://linchpin.com)** playbook   [![](https://camo.githubusercontent.com/0e4e51cb09cd88d0664b7093043c05d124b161e9da8d2cac5d7e5b36483013cb/68747470733a2f2f6173736574732e6c696e636870696e2e636f6d2f6c696e636870696e2d6c6f676f2d7072696d6172792e737667)](https://camo.githubusercontent.com/0e4e51cb09cd88d0664b7093043c05d124b161e9da8d2cac5d7e5b36483013cb/68747470733a2f2f6173736574732e6c696e636870696e2e636f6d2f6c696e636870696e2d6c6f676f2d7072696d6172792e737667)  This is a codified version of WordPress coding standards with Linchpin customizations. We include phpcs rules for PHP code quality and consistency.

Contributing
------------

[](#contributing)

We welcome contributions to these standards and want to make the experience as seamless as possible. To learn more about contributing, please reference the [CONTRIBUTING.md](CONTRIBUTING.md) file.

Setup
-----

[](#setup)

Install via Composer:

```
composer require --dev linchpin/coding-standards
```

Using PHPCS
-----------

[](#using-phpcs)

Run the following command to run the standards checks:

```
vendor/bin/phpcs --standard=vendor/linchpin/coding-standards .

```

We use the [DealerDirect phpcodesniffer-composer-installer](https://github.com/Dealerdirect/phpcodesniffer-composer-installer) package to handle `installed_paths` for PHPCS when first installing the Linchpin ruleset. If you an error such as `ERROR: Referenced sniff "WordPress-Core" does not exist`, delete the `composer.lock` file and `vendor` directories and re-install Composer dependencies.

The final `.` here specifies the files you want to test; this is typically the current directory (`.`), but you can also selectively check files or directories by specifying them instead.

You can add this to your GitHub Actions workflow or CI configuration:

```
- name: Run PHPCS
  run: vendor/bin/phpcs --standard=vendor/linchpin/coding-standards .
```

### Excluding Files

[](#excluding-files)

This standard includes special support for a `.phpcsignore` file (in the future, this should be [built into phpcs itself](https://github.com/squizlabs/PHP_CodeSniffer/issues/1884)). Simply place a `.phpcsignore` file in your root directory (wherever you're going to run `phpcs` from).

The format of this file is similar to `.gitignore` and similar files: one pattern per line, comment lines should start with a `#`, and whitespace-only lines are ignored:

```
# Exclude our tests directory.
tests/

# Exclude any file ending with ".inc"
*\.inc

```

Note that the patterns should match [the PHP\_CodeSniffer style](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders): `*` is translated to `.*` for convenience, but all other characters work like a regular expression.

Patterns are relative to the directory that the `.phpcsignore` file lives in. On load, they are translated to absolute patterns: e.g. `*/tests/*` in `/your/dir/.phpcsignore` will become `/your/dir/.*/tests/.*` as a regular expression. **This differs from the regular PHP\_CodeSniffer practice.**

### Advanced/Extending

[](#advancedextending)

If you want to add further rules (such as WordPress.com VIP-specific rules) or customize PHPCS defaults, you can create your own custom standard file (e.g. `phpcs.xml.dist`):

```

	.

```

You can then reference this file when running phpcs:

```
vendor/bin/phpcs --standard=phpcs.ruleset.xml .

```

#### Excluding/Disabling Checks

[](#excludingdisabling-checks)

You can also customise the rule to exclude elements if they aren't applicable to the project:

```

```

Rules can also be disabled inline. [phpcs rules can be disabled](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file) with a `// @codingStandardsIgnoreLine` comment.

To find out what these codes are, specify `-s` when running `phpcs`, and the code will be output as well. You can specify a full code, or a partial one to disable groups of errors.

Included Checks
---------------

[](#included-checks)

The phpcs standard is based upon the `WordPress-VIP` standard from [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards), with [customisation and additions](Linchpin/ruleset.xml) to match our style guide.

[![Linchpin an award winning digital agency building immersive, high performing web experiences](https://camo.githubusercontent.com/1618c0cf7b25d153839fb1d593bc90f3a3afe3fbd6a13087f7337c836b6e02ef/68747470733a2f2f6173736574732e6c696e636870696e2e636f6d2f6769746875622f6c696e636870696e2d6769746875622d7265706f2d62616e6e65722e6a7067)](https://camo.githubusercontent.com/1618c0cf7b25d153839fb1d593bc90f3a3afe3fbd6a13087f7337c836b6e02ef/68747470733a2f2f6173736574732e6c696e636870696e2e636f6d2f6769746875622f6c696e636870696e2d6769746875622d7265706f2d62616e6e65722e6a7067)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance89

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.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 ~6 days

Recently: every ~16 days

Total

12

Last Release

63d ago

### Community

Maintainers

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

---

Top Contributors

[![aaronware](https://avatars.githubusercontent.com/u/3390827?v=4)](https://github.com/aaronware "aaronware (59 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (12 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (3 commits)")

---

Tags

automationcoding-standardswordpress

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[humanmade/coding-standards

Human Made Coding Standards

161424.0k49](/packages/humanmade-coding-standards)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

496.8M42](/packages/woocommerce-woocommerce-sniffs)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1019.7k7](/packages/syde-phpcs)[awesomemotive/wpforms-phpcs

WPForms Coding Standards

147.0k](/packages/awesomemotive-wpforms-phpcs)[bjornjohansen/wp-pre-commit-hook

Pre-commit hook for WordPress projects

118.8k3](/packages/bjornjohansen-wp-pre-commit-hook)

PHPackages © 2026

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