PHPackages                             bradp/wordpress-pattern-category-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. bradp/wordpress-pattern-category-phpcs

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

bradp/wordpress-pattern-category-phpcs
======================================

PHPCS sniffs for enforcing categories in WordPress block pattern files.

1.0.0(3mo ago)0248↓50%MITPHPPHP &gt;=7.4

Since Feb 13Pushed 3mo agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

WordPressPatternCategory
========================

[](#wordpresspatterncategory)

PHPCS sniffs for enforcing categories in WordPress block pattern files.

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

[](#installation)

```
composer require --dev bradp/wordpress-pattern-category-phpcs
```

Usage
-----

[](#usage)

Add the rule to your project's `phpcs.xml` or `.phpcs.xml.dist`:

```

```

What it checks
--------------

[](#what-it-checks)

The sniff validates that WordPress block pattern files contain a file-level docblock with the correct metadata:

1. **Missing docblock** — The pattern file must have a `/** ... */` docblock near the top.
2. **Missing Categories** — The docblock must include a `Categories:` line.
3. **Missing base category** — If `base_category` is configured, it must appear in the comma-separated list of categories.

### Example of a valid pattern file

[](#example-of-a-valid-pattern-file)

```

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance82

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

94d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66798?v=4)[Brad Parbs](/maintainers/bradp)[@bradp](https://github.com/bradp)

---

Top Contributors

[![bradp](https://avatars.githubusercontent.com/u/66798?v=4)](https://github.com/bradp "bradp (2 commits)")

---

Tags

standardsphpcswordpress

### Embed Badge

![Health badge](/badges/bradp-wordpress-pattern-category-phpcs/health.svg)

```
[![Health](https://phpackages.com/badges/bradp-wordpress-pattern-category-phpcs/health.svg)](https://phpackages.com/packages/bradp-wordpress-pattern-category-phpcs)
```

###  Alternatives

[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)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[mayflower/mo4-coding-standard

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

17508.3k5](/packages/mayflower-mo4-coding-standard)[infinum/eightshift-coding-standards

Eightshift WordPress Coding Standards

1785.2k3](/packages/infinum-eightshift-coding-standards)[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)
