PHPackages                             syde/phpcs - 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. syde/phpcs

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

syde/phpcs
==========

Syde PHP coding standards for WordPress projects.

1.0.1(5mo ago)1019.7k—9.6%[2 issues](https://github.com/inpsyde/phpcs/issues)7GPL-2.0-or-laterPHPPHP &gt;=8.1CI passing

Since Dec 20Pushed 5mo ago2 watchersCompare

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

READMEChangelog (4)Dependencies (13)Versions (5)Used By (7)

[![Latest Stable Version](https://camo.githubusercontent.com/f3c5b43b4026db06d2df1d96455429b2acb2a7683a8f1d290da09ccaaf5796d4/68747470733a2f2f706f7365722e707567782e6f72672f737964652f70687063732f76)](https://packagist.org/packages/syde/phpcs)[![License](https://camo.githubusercontent.com/6e99d8443e1f1903a061cc24681247df7cee4c85122695988890b6ba329d6819/68747470733a2f2f706f7365722e707567782e6f72672f737964652f70687063732f6c6963656e7365)](https://github.com/inpsyde/phpcs/blob/HEAD/LICENSE)[![PHP Version Require](https://camo.githubusercontent.com/a50ac2f62bfed548a1e2312b549c734a30b042ac1eb9009aab9b981fd2a37e0b/68747470733a2f2f706f7365722e707567782e6f72672f737964652f70687063732f726571756972652f706870)](https://packagist.org/packages/syde/phpcs)[![PHP Quality Assurance Status](https://github.com/inpsyde/phpcs/actions/workflows/quality-assurance-php.yml/badge.svg)](https://github.com/inpsyde/phpcs/actions/workflows/quality-assurance-php.yml)

Syde PHP Coding Standards
=========================

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

> Syde PHP coding standards for WordPress projects.

This package contains [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/) sniffs and rulesets to validate code developed for WordPress projects. It ensures code quality and adherence to coding conventions, especially the official [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/), as well as select best practices from the wider web development and PHP industries.

---

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
    - [Local Installation](#local-installation)
    - [Global Installation](#global-installation)
    - [Verify Installation](#verify-installation)
- [Rulesets](#rulesets)
- [Usage](#usage)
    - [Command Line](#command-line)
    - [Custom Ruleset](#custom-ruleset)
    - [Customization](#customization)
    - [Auto-Fixing](#auto-fixing)
    - [Disabling or Excluding Rules](#disabling-or-excluding-rules)
    - [IDE Integration](#ide-integration)
- [Migrating from Inpsyde to Syde PHP Coding Standards](#migrating-from-inpsyde-to-syde-php-coding-standards)
- [Crafted by Syde](#crafted-by-syde)
- [Copyright and License](#copyright-and-license)
- [Contributing](#contributing)

---

Requirements
------------

[](#requirements)

The Syde PHP Coding Standards package requires:

- PHP 8.1+
- [Composer](https://getcomposer.org/)
- [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/)
- [PHP\_CodeSniffer Standards Composer Installer Plugin](https://github.com/PHPCSStandards/composer-installer/)
- [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility/) (`dev-develop`)
- [PHPCSExtra](https://github.com/PHPCSStandards/PHPCSExtra/)
- [PHPCSUtils](https://github.com/PHPCSStandards/PHPCSUtils/)
- [Slevomat Coding Standard](https://github.com/slevomat/coding-standard/)
- [VariableAnalysis](https://github.com/sirbrillig/phpcs-variable-analysis/)
- [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards/)
- [WordPress VIP Coding Standards](https://github.com/Automattic/VIP-Coding-Standards/)

When installed for local development, these packages will be installed as well:

- [PHPStan](https://github.com/phpstan/phpstan/)
- [PHPStan Deprecation Rules Extension](https://github.com/phpstan/phpstan-deprecation-rules)
- [PHPStan No-Private Extension](https://github.com/swissspidy/phpstan-no-private)
- [PHPUnit](https://github.com/sebastianbergmann/phpunit/)

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

[](#installation)

Installing this package with [Composer](https://getcomposer.org/) will automatically install all required dependencies, and register the rulesets from the Syde PHP Coding Standards and other external standards with [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/) using the [PHP\_CodeSniffer Standards Composer Installer Plugin](https://github.com/PHPCSStandards/composer-installer/).

### Local Installation

[](#local-installation)

To install the Syde PHP Coding Standards, execute the following commands from the root of your project:

```
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev syde/phpcs
```

### Global Installation

[](#global-installation)

Alternatively, you can also install the Syde PHP Coding Standards globally:

```
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev syde/phpcs
```

### Verify Installation

[](#verify-installation)

You can verify the installation by executing the following command:

```
./vendor/bin/phpcs -i
```

This should display something like the following, including the Syde PHP Coding Standards (bold):

> The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, **Syde**, **Syde-Core**, **Syde-Extra**, **Syde-Templates**, WordPress-VIP-Go, WordPressVIPMinimum, PHPCompatibility, Modernize, NormalizedArrays, Universal, PHPCSUtils, VariableAnalysis, SlevomatCodingStandard, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra

Rulesets
--------

[](#rulesets)

This package contains four rulesets:

- `Syde`: Complete set with all the sniffs defined in this package.
- `Syde-Core`: Minimum required rules for modern WordPress development at scale.
- `Syde-Extra`: Opinionated rules specific to formatting and other preferred coding practices at Syde; includes `Syde-Core`.
- `Syde-Templates`: Additional rules specific to PHP template files.

Usage
-----

[](#usage)

### Command Line

[](#command-line)

Once the package has been installed via Composer, you can run the `phpcs` command-line tool on a given file or directory using the desired Syde PHP Coding Standard.

For example, this is how you can check a third-party plugin for minimum required rules only:

```
./vendor/bin/phpcs --standard=Syde-Core ./some-plugin/
```

Using the full `Syde` standard for a specific file would look like so:

```
./vendor/bin/phpcs --standard=Syde ./some-plugin/some-file.php
```

For more information on PHP\_CodeSniffer usage, refer to the [documentation in the PHP\_CodeSniffer Wiki](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Usage).

### Custom Ruleset

[](#custom-ruleset)

Like any other PHP\_CodeSniffer standard, you can add the Syde PHP Coding Standard(s) to a custom PHP\_CodeSniffer ruleset (e.g., a `phpcs.xml.dist` file).

A minimum working example could look like so:

```

```

Using a custom ruleset avoids passing many arguments via the command line, and at the same time ensures consistent usage. All you have to do then is to run the `phpcs` command-line tool:

```
./vendor/bin/phpcs
```

Any argument or option you pass, will overwrite what's been defined in the custom ruleset.

Here is a real-world example including files and folders to check, as well as some PHP\_CodeSniffer and ruleset configuration:

```

    ./src
    ./templates
    ./tests
    ./index.php

        */templates/*

        */templates/*

        */tests/*

```

For more information, take a look at [Using a Default Configuration File](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file) and the [Annotated Ruleset](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Annotated-Ruleset) pages in the [PHP\_CodeSniffer Wiki](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki).

### Customization

[](#customization)

The Syde PHP Coding Standards contain a number of sniffs that are configurable. This means that you can turn parts of the sniff on or off, or change the behavior by setting a property for the sniff in your custom ruleset file.

You can find a complete list of all the properties you can change for the Syde PHP Coding Standards in the [list of all sniffs](docs/Sniffs.md).

### Auto-Fixing

[](#auto-fixing)

The Syde PHP Coding Standards include several sniffs that support automatic fixing of coding standard violations. These sniffs are marked with the 🔧 symbol in the [list of all sniffs](docs/Sniffs.md). To fix your code automatically, run the `phpcbf` command-line tool instead of `phpcs`:

```
./vendor/bin/phpcbf --standard=Syde-Extra ./some-file.php
```

Always remember to back up your code before performing automatic fixes. Also, make sure to manually check the updated code as the automatic fixer can sometimes produce unwanted results.

### Disabling or Excluding Rules

[](#disabling-or-excluding-rules)

For information about disabling or excluding rules, refer to the [Disabling or Excluding Rules](docs/Disabling.md) page in the `docs/` folder.

### IDE Integration

[](#ide-integration)

For information about IDE integration (currently PhpStorm only), refer to the [IDE Integration](docs/Integration.md) page in the `docs/` folder.

Migrating from Inpsyde to Syde PHP Coding Standards
---------------------------------------------------

[](#migrating-from-inpsyde-to-syde-php-coding-standards)

In case you are already using the Inpsyde PHP Coding Standards (version 1 or 2) and want to migrate to the Syde PHP Coding Standards, refer to the [Migration](docs/Migration.md) page in the `docs/` folder.

Crafted by Syde
---------------

[](#crafted-by-syde)

The team at [Syde](https://syde.com/) is engineering the Web since 2006.

Copyright and License
---------------------

[](#copyright-and-license)

This package is [free software](https://www.gnu.org/philosophy/free-sw.en.html) distributed under the terms of the GNU General Public License version 2 or (at your option) any later version. For the full license, see [LICENSE](./LICENSE).

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

[](#contributing)

All contributions are very welcome. Please read the [CONTRIBUTING](https://github.com/inpsyde/.github/blob/HEAD/CONTRIBUTING.md) documentation to get started.

By contributing code, you grant its use under the current license (see [LICENSE](./LICENSE)).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance66

Regular maintenance activity

Popularity33

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.2% 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 ~115 days

Total

4

Last Release

168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/003585053f7d5d2127d31d5a4e79ba309acc075154f5752de8f429ac42c54dbe?d=identicon)[Syde](/maintainers/Syde)

---

Top Contributors

[![tfrommen](https://avatars.githubusercontent.com/u/6049306?v=4)](https://github.com/tfrommen "tfrommen (23 commits)")[![lloc](https://avatars.githubusercontent.com/u/1012205?v=4)](https://github.com/lloc "lloc (2 commits)")[![Chrico](https://avatars.githubusercontent.com/u/3417446?v=4)](https://github.com/Chrico "Chrico (1 commits)")[![cristianobaptista](https://avatars.githubusercontent.com/u/1046799?v=4)](https://github.com/cristianobaptista "cristianobaptista (1 commits)")

---

Tags

coding-standardsphpphp-codesnifferphpcswordpressphpcswordpressstatic analysiscoding-standardsInpsydeSyde

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/syde-phpcs/health.svg)

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

###  Alternatives

[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[inpsyde/php-coding-standards

PHP 7.4+ coding standards for Syde WordPress projects.

101163.9k45](/packages/inpsyde-php-coding-standards)[wp-coding-standards/wpcs

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

2.8k42.5M1.6k](/packages/wp-coding-standards-wpcs)[automattic/vipwpcs

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

25510.2M145](/packages/automattic-vipwpcs)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

496.8M42](/packages/woocommerce-woocommerce-sniffs)[drupal/coder

Coder is a library to review Drupal code.

3043.6M461](/packages/drupal-coder)

PHPackages © 2026

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