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.4.0(1mo ago)7698↑453.1%1[1 issues](https://github.com/10up/wp-compat-validation-tool/issues)1MITPHPCI passing

Since Oct 3Pushed 1mo ago42 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 today

READMEChangelog (4)Dependencies (2)Versions (7)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.

Replace `` with a unique translation domain specific to your project. This is usually the slug for your theme or plugin. The `wp-compat-validation-tool` translation domain will be replaced by ``.

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' )
    ->set_wordpress_min_required_version( '6.8' );

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

44

—

FairBetter than 90% of packages

Maintenance88

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 62.8% 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 ~320 days

Total

4

Last Release

46d 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)")[![peterwilsoncc](https://avatars.githubusercontent.com/u/519727?v=4)](https://github.com/peterwilsoncc "peterwilsoncc (15 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 (3 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

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k16.4k79](/packages/elgg-elgg)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[rainlab/user-plugin

User plugin for October CMS

11955.0k15](/packages/rainlab-user-plugin)

PHPackages © 2026

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