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

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

davekellam/phpcs-wp
===================

097[1 issues](https://github.com/davekellam/phpcs-wp/issues)1

Since Jul 21Pushed 6mo agoCompare

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

READMEChangelogDependenciesVersions (3)Used By (1)

PHPCS Configuration
===================

[](#phpcs-configuration)

Composer library to provide drop in installation and configuration of [WPCS](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) and [PHPCompatibilityWP](https://github.com/PHPCompatibility/PHPCompatibilityWP), setting reasonable defaults for WordPress development with nearly zero configuration.

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

[](#installation)

Install the library via Composer:

```
$ composer require --dev davekellam/wp-phpcs-composer:main
```

That's it!

Usage
-----

[](#usage)

Lint your PHP files with the following command:

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

If relying on Composer, edit the `composer.json` file by adding the following:

```
	"scripts": {
		"lint": [
			"phpcs ."
		],
	}
```

Then lint via:

```
$ composer run lint
```

### Continuous Integration

[](#continuous-integration)

PHPCS Configuration plays nicely with Continuous Integration solutions. Out of the box, the library loads the `DK-Default` ruleset, and checks for syntax errors for PHP 7 or higher.

To override the default PHP version check, set the `--runtime-set testVersion 7.0-` configuration option. Example for PHP version 7.2 and above:

```
$ ./vendor/bin/phpcs --runtime-set testVersion 7.2-
```

See more [information about specifying PHP version](https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions).

Note that you can only overrule PHP version check from the command-line.

### IDE Integration

[](#ide-integration)

Some IDE integrations of PHPCS fail to register the `DK-Default` ruleset. In order to rectify this, place `phpcs.xml` at your project root:

```

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance47

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b76a821057de6a2632be36e4add4142b867cd8eab95af14e3f7ac8f8175202b?d=identicon)[davekellam](/maintainers/davekellam)

---

Top Contributors

[![davekellam](https://avatars.githubusercontent.com/u/60804?v=4)](https://github.com/davekellam "davekellam (9 commits)")[![plankmtl](https://avatars.githubusercontent.com/u/50153306?v=4)](https://github.com/plankmtl "plankmtl (1 commits)")

### Embed Badge

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

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

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[wptrt/wpthemereview

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

217736.5k29](/packages/wptrt-wpthemereview)[inpsyde/modularity

Modular PSR-11 implementation for WordPress plugins, themes or libraries.

54383.3k3](/packages/inpsyde-modularity)[php-standard-library/phpstan-extension

PHPStan PSL extension

201.2M13](/packages/php-standard-library-phpstan-extension)[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)

PHPackages © 2026

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