PHPackages                             claudiosanches/wp-git-hooks - 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. claudiosanches/wp-git-hooks

ActiveScripts[Utility &amp; Helpers](/categories/utility)

claudiosanches/wp-git-hooks
===========================

WP GIT Hooks

1.3.3(8y ago)53371[1 PRs](https://github.com/claudiosanches/wp-git-hooks/pulls)1GPL-3.0-or-laterPHPPHP &gt;=7.0

Since Oct 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/claudiosanches/wp-git-hooks)[ Packagist](https://packagist.org/packages/claudiosanches/wp-git-hooks)[ RSS](/packages/claudiosanches-wp-git-hooks/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (3)Versions (9)Used By (1)

WP GIT Hooks
============

[](#wp-git-hooks)

My GIT hooks for WordPress plugins and themes development.

Hooks
-----

[](#hooks)

- `pre-commit` - Lint and check coding standards using [WPCS](https://packagist.org/packages/wp-coding-standards/wpcs).

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

[](#installation)

```
composer require --dev claudiosanches/wp-git-hooks
```

Setup
-----

[](#setup)

Include the follow lines into the project's `composer.json`:

```
"scripts": {
    "pre-update-cmd": [
        "ClaudioSanches\\WpGitHooks\\Hooks::preHooks"
    ],
    "pre-install-cmd": [
        "ClaudioSanches\\WpGitHooks\\Hooks::preHooks"
    ],
    "post-install-cmd": [
        "ClaudioSanches\\WpGitHooks\\Hooks::postHooks"
    ],
    "post-update-cmd": [
        "ClaudioSanches\\WpGitHooks\\Hooks::postHooks"
    ]
}

```

This will install all hooks and setup WPCS.

### Sample phpcs.xml for PHPCS/WPCS

[](#sample-phpcsxml-for-phpcswpcs)

A `phpcs.xml` file is required in order to correct run your project's coding standards.

```

    PHP_CodeSniffer ruleset for WordPress plugins and themes development.

```

### Manual setup (optional)

[](#manual-setup-optional)

By default should already run all commands from composer `scripts` when installed, but if necessary run it manually is possible with the follow commands:

```
composer run-script pre-update-cmd
composer run-script post-update-cmd
```

Release history
---------------

[](#release-history)

- 2018-08-01 - 1.3.3
    - Fixed Packagist.org builds.
- 2018-07-31 - 1.3.2
    - Full support for `phpcs.xml.dist`.
- 2017-12-18 - 1.3.1
    - Fixed support for `phpcs.xml.dist`.
- 2017-12-18 - 1.3.0
    - Requires `phpcs.xml` or `phpcs.xml.dist` by default.
    - No longer accepts `phpcs.xml`.
- 2017-11-19 - 1.2.0
    - Included support for `PHPCompatibility`.
    - Automatically load all PHP\_CodeSniffer plugins.
- 2017-11-09 - 1.1.0
    - Removed unnecessary configuration file.
- 2017-10-30 - 1.0.1
    - Fixed vendor path for `hooks/pre-commit` and `bin/read-wp-git-hooks-config`.
- 2017-10-27 - 1.0.0
    - Initial release.

Sources
-------

[](#sources)

Inspired by:

-
-

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Every ~39 days

Recently: every ~63 days

Total

8

Last Release

2936d ago

### Community

Maintainers

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

---

Top Contributors

[![claudiosanches](https://avatars.githubusercontent.com/u/1264099?v=4)](https://github.com/claudiosanches "claudiosanches (21 commits)")

---

Tags

gitpre-commitwordpresswordpress

### Embed Badge

![Health badge](/badges/claudiosanches-wp-git-hooks/health.svg)

```
[![Health](https://phpackages.com/badges/claudiosanches-wp-git-hooks/health.svg)](https://phpackages.com/packages/claudiosanches-wp-git-hooks)
```

###  Alternatives

[humanmade/coding-standards

Human Made Coding Standards

161450.0k65](/packages/humanmade-coding-standards)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.3M150](/packages/wp-cli-wp-cli-tests)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

497.7M64](/packages/woocommerce-woocommerce-sniffs)[infinum/eightshift-coding-standards

Eightshift WordPress Coding Standards

1792.8k7](/packages/infinum-eightshift-coding-standards)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1029.4k10](/packages/syde-phpcs)

PHPackages © 2026

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