PHPackages                             10up/wp-compat-validation-tool - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. 10up/wp-compat-validation-tool

ActiveWordpress-plugin[Validation &amp; Sanitization](/categories/validation)

10up/wp-compat-validation-tool
==============================

Perform PHP and WP version compatibility checks in your plugin.

0.3.1(2y ago)779↓50%[2 issues](https://github.com/10up/wp-compat-validation-tool/issues)1MITPHPCI passing

Since Oct 3Pushed 9mo ago43 watchersCompare

[ Source](https://github.com/10up/wp-compat-validation-tool)[ Packagist](https://packagist.org/packages/10up/wp-compat-validation-tool)[ Docs](https://github.com/10up/wp-compat-validation-tool)[ RSS](/packages/10up-wp-compat-validation-tool/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (1)

WordPress Compatibility Tool
============================

[](#wordpress-compatibility-tool)

> Perform PHP and WP version compatibility checks in your plugin.

[![Support Level](https://camo.githubusercontent.com/8c579db8a55059deda3033173df4c217a684e93a04acd7adb9a91e67d90b3ced/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737570706f72742d626574612d626c756576696f6c65742e737667)](#support-level) [![MIT License](https://camo.githubusercontent.com/5588df4a3418f49894a8d9a2fef1f25fc7e3ab5c79f3bc54f33d1fb1be19a2be/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f313075702f77702d636f6d7061742d76616c69646174696f6e2d746f6f6c2e737667)](https://github.com/10up/wp-compat-validation-tool/blob/trunk/LICENSE.md)

Overview
--------

[](#overview)

This library provides API methods to perform version validation checks in WordPress plugins. Most helpful in situation where the plugin should gracefully exit on activation when system requirements aren't met.

Setup
-----

[](#setup)

In your project's `composer.json`, add the following:

```
{
    "require": {
        "10up/wp-compat-validation-tool": "dev-trunk"
    },
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/10up/wp-compat-validation-tool.git"
        }
    ],
    "scripts": {
        "post-install-cmd": [
            "./10up-lib/wp-compat-validation-tool/replace-namespace.sh "
        ],
        "post-update-cmd": [
            "./10up-lib/wp-compat-validation-tool/replace-namespace.sh "
        ]
    },
    "extra": {
        "installer-paths": {
            "./{$name}/": ["10up/wp-compat-validation-tool"]
        }
    }
}
```

Replace `` with a unique namespace specific to your project. The `WP_Compat_Validation_Tools` namespace will be replaced by `` to avoid namespace collisions in situations where multiple plugins use this package as their dependencies.

Usage
-----

[](#usage)

```
if ( ! is_readable( __DIR__ . '/10up-lib/wp-compat-validation-tool/src/Validator.php' ) ) {
    return;
}

require_once '10up-lib/wp-compat-validation-tool/src/Validator.php';

$compat_checker = new \New_Name_Space\Validator();
$compat_checker
    ->set_plugin_name( '' )
    ->set_php_min_required_version( '7.4' );

if ( ! $compat_checker->is_plugin_compatible() ) {
    return;
}
```

The `Validator` class should be instantiated before loading the `vendor/autoload.php` file, and the validation checks should be done before loading or instantiating any other composer dependency.

Support Level
-------------

[](#support-level)

**Beta:** This project is quite new and we're not sure what our ongoing support level for this will be. Bug reports, feature requests, questions, and pull requests are welcome. If you like this project please let us know, but be cautious using this in a Production environment!

Changelog
---------

[](#changelog)

A complete listing of all notable changes to 10up Sitemaps is documented in [CHANGELOG.md](https://github.com/10up/wp-compat-validation-tool/blob/develop/CHANGELOG.md).

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

[](#contributing)

Please read [CODE\_OF\_CONDUCT.md](https://github.com/10up/wp-compat-validation-tool/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/wp-compat-validation-tool/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/wp-compat-validation-tool/blob/develop/CREDITS.md) for a listing of maintainers of, contributors to, and libraries used by 10up Sitemaps.

Like what you see?
------------------

[](#like-what-you-see)

[![Work with us at 10up](https://camo.githubusercontent.com/5ec5223fa6fe20a5ca00d8d768bd7ee91e93f67c9d7a06e575c87e3ed1d00263/68747470733a2f2f313075702e636f6d2f75706c6f6164732f323031362f31302f313075702d4769746875622d42616e6e65722e706e67)](http://10up.com/contact/)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 77.1% 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 ~19 days

Total

3

Last Release

921d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3358927?v=4)[10up](/maintainers/10up)[@10up](https://github.com/10up)

---

Top Contributors

[![Sidsector9](https://avatars.githubusercontent.com/u/17757960?v=4)](https://github.com/Sidsector9 "Sidsector9 (54 commits)")[![jeffpaul](https://avatars.githubusercontent.com/u/2818133?v=4)](https://github.com/jeffpaul "jeffpaul (12 commits)")[![dkotter](https://avatars.githubusercontent.com/u/916738?v=4)](https://github.com/dkotter "dkotter (2 commits)")[![faisal-alvi](https://avatars.githubusercontent.com/u/25176325?v=4)](https://github.com/faisal-alvi "faisal-alvi (2 commits)")

### Embed Badge

![Health badge](/badges/10up-wp-compat-validation-tool/health.svg)

```
[![Health](https://phpackages.com/badges/10up-wp-compat-validation-tool/health.svg)](https://phpackages.com/packages/10up-wp-compat-validation-tool)
```

###  Alternatives

[ichikaway/cakeplus

Cake plus is cakephp plugin and provides some functions for CakePHP.

52101.1k1](/packages/ichikaway-cakeplus)[janvince/smallcontactform

Simple but flexible multi language contact form builder with custom fields, validation and passive antispam

307.4k](/packages/janvince-smallcontactform)

PHPackages © 2026

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