PHPackages                             seothemes/compat-checker - 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. seothemes/compat-checker

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

seothemes/compat-checker
========================

Composer package to check PHP, WordPress and Genesis compatibility.

111PHP

Since Feb 6Pushed 7y agoCompare

[ Source](https://github.com/seothemes/compat-checker)[ Packagist](https://packagist.org/packages/seothemes/compat-checker)[ RSS](/packages/seothemes-compat-checker/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Compat Checker
==============

[](#compat-checker)

Composer package or drop-in class to check PHP, WordPress and Genesis compatibility. It displays a deactivation notice if minimum requirements are not met and provides helper functions to check if a plugin is compatible.

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

[](#installation)

Compat Checker can be installed as a drop-in class or using Composer. See the [example plugin](https://github.com/seothemes/compat-checker/blob/master/example-plugin.php) for a quick guide.

### Composer (recommended)

[](#composer-recommended)

Navigate to your project root in terminal:

```
cd my-project
```

Require Composer package (Composer must be installed);

```
composer require seothemes/compat-checker
```

### Manual (drop-in)

[](#manual-drop-in)

Download the `src/class-compat-checker.php` file and place it in your project, in any directory.

Usage
-----

[](#usage)

### 1. Load Class

[](#1-load-class)

#### Composer autoloader

[](#composer-autoloader)

Require the `vendor/autoload.php` file in your project, if you haven't already:

```
require_once __DIR__ . '/vendor/autoload.php';
```

This automatically loads the class and makes it ready for use.

#### Manually require

[](#manually-require)

Require the `src/class-compat-checker.php` file in your project:

```
require_once __DIR__ . '/src/class-compat-checker.php';
```

*Note: This may be different depending on where you have placed the class*

### 2. Add Settings

[](#2-add-settings)

Genesis Compat provides multiple ways to define your settings. Below are the 2 easiest methods:

#### composer.json

[](#composerjson)

Add the settings array to the `extra` `compat-checker` config:

```
{
  "name": "company/package",
  "require": {
    "php": ">=5.6" // Used if no min_php_version defined.
  },
  "extra": {
    "compat-checker": {
      "plugin_slug": "compat-checker/example-plugin.php",
      "plugin_name": "Compat Checker",
      "min_php_version": "5.4.0",
      "min_wp_version": "5.0.0",
      "min_genesis_version": "2.8.0",
      "require_genesis": "true",
      "require_child_theme": "true"
    }
  }
}
```

#### Array

[](#array)

Create a PHP array and assign it to a variable:

```
$compat_settings = apply_filters( 'compat_checker_settings', array(
	'plugin_slug'         => 'compat-checker/example-plugin.php',
	'plugin_name'         => 'Compat Checker',
	'min_php_version'     => '5.4.0',
	'min_wp_version'      => '5.0.0',
	'min_genesis_version' => '2.8.0',
	'require_genesis'     => true,
	'require_child_theme' => true,
) );
```

### 3. Instantiate Class

[](#3-instantiate-class)

The Genesis\_Compat class accepts either a path to the `composer.json` file or an array of settings. If neither are provided, the default settings will be used, which can also be filtered using the `compat_checker_defaults` hook. The `run()` method needs to be called once the class has been instantiated.

#### Using composer.json

[](#using-composerjson)

If using `composer.json` for your settings, pass in the path to the `run()` method:

```
$compat_checker = new Compat_Checker( __DIR__ . '/composer.json' );
$compat_checker->run();
```

#### Using PHP array

[](#using-php-array)

```
$compat_checker = new Compat_Checker( $compat_settings );
$compat_checker->run();
```

### 4. Check Compatibility

[](#4-check-compatibility)

Now that the class is setup you can use it to check that your plugin meets all of the minimum requirements before proceeding. The easiest way to do this is to use the `is_compatible()` method, which can be called right after `run()`:

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

This will stop your program running, exiting safely after displaying the deactivation notice.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/55b9ce7d3453d6c0c149cd77f4441a19bf692d968bf58b7f3dbc3cf9450c2051?d=identicon)[seothemes](/maintainers/seothemes)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/seothemes-compat-checker/health.svg)

```
[![Health](https://phpackages.com/badges/seothemes-compat-checker/health.svg)](https://phpackages.com/packages/seothemes-compat-checker)
```

PHPackages © 2026

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