PHPackages                             pragmaticweb/php-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. pragmaticweb/php-coding-standards

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

pragmaticweb/php-coding-standards
=================================

Style guide for writing consistent PHP code for WordPress projects.

0.0.1(6y ago)0575[1 issues](https://github.com/PragmaticWebLimited/php-coding-standards/issues)GPL-3.0-or-laterPHP &gt;=7.0

Since Apr 8Pushed 6y ago3 watchersCompare

[ Source](https://github.com/PragmaticWebLimited/php-coding-standards)[ Packagist](https://packagist.org/packages/pragmaticweb/php-coding-standards)[ RSS](/packages/pragmaticweb-php-coding-standards/feed)WikiDiscussions master Synced 1w ago

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

Pragmatic PHP Coding Standards
==============================

[](#pragmatic-php-coding-standards)

**A project by [Pragmatic](https://pragmatic.agency).**

 [![Version 0.0.1](https://camo.githubusercontent.com/0fa85b3629baaabb413cf471be25667974184670c8a7aa52b092ffd4f0c045ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e302e312d626c75652e7376673f63616368655365636f6e64733d3836343030)](https://camo.githubusercontent.com/0fa85b3629baaabb413cf471be25667974184670c8a7aa52b092ffd4f0c045ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e302e312d626c75652e7376673f63616368655365636f6e64733d3836343030) [![License: GPL 3.0 only](https://camo.githubusercontent.com/bd970efd5735cd2f7e43bcd74808d443968ee7256f1ce21fc1d46ed67b8c9950/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d332e302d2d6f6e6c792d79656c6c6f772e737667)](https://camo.githubusercontent.com/bd970efd5735cd2f7e43bcd74808d443968ee7256f1ce21fc1d46ed67b8c9950/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d332e302d2d6f6e6c792d79656c6c6f772e737667)

> Style guide for writing consistent PHP code for WordPress projects.

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

[](#installation)

Our PHP coding standards are enforced via [php\_codesniffer](https://packagist.org/packages/squizlabs/php_codesniffer) and can be installed using the PHP package manager [composer](https://getcomposer.org/).

```
$ composer require pragmaticweb/php-coding-standards --dev
```

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

When installed using composer, our coding standards are ready to be used by running:

```
$ vendor/bin/phpcs --standard="Pragmatic" ./my-plugin ./my-file.php
```

### Configuration file

[](#configuration-file)

In order to make it easier to modify our standards to better fit your project, you can create a `phpcs.xml.dist` file which could contain something like this:

```

		My Project coding standard.

		./my-plugin
		./my-file.php

```

Using a config file, allows you to only run `vendor/bin/phpcs` to check the code style.

For more advanced usage, please refer to the [PHP Codesniffer docs](https://github.com/squizlabs/PHP_CodeSniffer/wiki).

Included rules
--------------

[](#included-rules)

### WordPress Coding Standard

[](#wordpress-coding-standard)

We're pretty much using WordPress coding standards at this point with some exclusions (see `ruleset.xml`).

See .

### PHPcompatibilityWP

[](#phpcompatibilitywp)

It allows to analyse code for compatibility with higher and lower versions of PHP. The default target version is PHP 7.0+.

Target version can be changed via custom `phpcs.xml`.

See

### PSR2

[](#psr2)

See

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

[](#contributing)

The Pragmatic coding standards is what enables our engineers to work together and write consistent PHP code.

Pull requests are welcome but will need to be reviewed by the members of our team.

Please open an issue first to discuss what you would like to change and, if our team agrees with it, then we could look into merging them.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

2231d ago

### Community

Maintainers

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

### Embed Badge

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

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

###  Alternatives

[humanmade/coding-standards

Human Made Coding Standards

161424.0k49](/packages/humanmade-coding-standards)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

496.8M42](/packages/woocommerce-woocommerce-sniffs)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1019.7k7](/packages/syde-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)
