PHPackages                             jayjay666/wp-requirements-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. jayjay666/wp-requirements-checker

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

jayjay666/wp-requirements-checker
=================================

Utility for WordPress plugin developers to check requirements. Lightweight library class for validation PHP version, PHP extensions, plugins and theirs versions in Wordpress Plugins.

1.2.1(3y ago)241GPL-2.0+PHPPHP &gt;=7.1

Since Dec 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jakubforman/wp-requirements-checker)[ Packagist](https://packagist.org/packages/jayjay666/wp-requirements-checker)[ Docs](https://github.com/jayjay666/wp-requirements-checker)[ RSS](/packages/jayjay666-wp-requirements-checker/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

WP Requirements Checker
=======================

[](#wp-requirements-checker)

[![Not Maintained](https://camo.githubusercontent.com/6ef55183dbdffab2e6dc22533eb40642936479bdd8cca5cbb7a992319e3d7de9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e74656e616e63652532304c6576656c2d4e6f742532304d61696e7461696e65642d79656c6c6f772e737667)](https://gist.github.com/cheerfulstoic/d107229326a01ff0f333a1d3476e068d)

Lightweight validator library class for check PHP version, PHP extensions, plugins and theirs versions in Wordpress Plugins.

Usage
-----

[](#usage)

Pass the requirements to a new instance of this class like so:

```
use jayjay666\WPRequirementsChecker\Validator;

// ... code before plugin/theme init

// ... start init code with
// Set PHP version, plugin root file path and plugin text domain
$validator = new Validator('7.1', 'my-awesome-plugin/my-awesome-plugin.php', 'my-awesome-plugin');

// Set plugins requirements
$validator->add_required_plugin('woocommerce/woocommerce','1.2.1');
$validator->add_required_plugin('elementor/elementor.php','3.0');

// Set PHP extensions requirements
$validator->add_required_extensions('curl');

if (!$validator->check()) {
    // ... min. requirements not valid. Automatic print error & disable plugin in check() method ad break code
    return;
}

// ... if requirements is valid, run your plugin code
// ... your plugin init code for start plugin
```

Implementation &amp; Instalation
--------------------------------

[](#implementation--instalation)

There are two ways you can include WP Requirements in your project.

**Copy this class (not recommended)**

You can copy the class found in `/src/Validator.php` in this project.

> Important! If you choose to do so, please rename this class with the prefix used by your project (for example: from Validator to My\_Plugin\_Validator). In this way there is less risk of a naming collision between projects. Also change namespace!

In case you want to include the file manually, please wrap the include or require call in a class\_exists conditional, like so:

```
// Namespace & prefix must be yours!!!
if (!class_exists( 'jayjay666\WPRequirementsChecker\Validator') ) {
    // do the file include or require here
}
```

**Use composer (recommended way)**

Include this library with:

`$ composer require jayjay666/wp-requirements-checker`

### Usage example

[](#usage-example)

```
use Elementor\Controls_Manager;use Elementor\Element_Section;
use jayjay666\WPRequirementsChecker\Validator;

class MyAwesomePlugin{
    const DOMAIN = 'my-awesome-plugin';

    private static $_instance = null;

    public static function instance()
    {

        if (is_null(self::$_instance)) {
            self::$_instance = new self();
        }
        return self::$_instance;
    }

    public function __construct()
    {
        add_action('plugins_loaded', [$this, 'init']);
    }

    public function init()
    {
        // Check requirements
        $validator = new Validator('7.1', 'my-awesome-plugin/my-awesome-plugin.php', MyAwesomePlugin::DOMAIN);
        // OR $validator = new Validator('7.1', 'my-awesome-plugin/my-awesome-plugin.php', self::DOMAIN);

        $validator->add_required_plugin('elementor/elementor.php','3.0');
        if (!$validator->check()) {
            return;
        }

        // add controlls to elementor
        add_action('elementor/element/section/section_layout/before_section_end', [__CLASS__, 'add_section_controls']);
    }

    public static function add_section_controls(Element_Section $element)
    {
        //
        // Přidám responzivní pro zarovnání slopců
        $element->add_responsive_control(
            'scb_section_horizontal_align',
            [
                'label' => __('Horizontal align', MyAwesomePlugin::DOMAIN),
                'type' => Controls_Manager::SELECT,
                'default' => '',
                'options' => [
                    '' => __('Default', 'elementor'),
                    'flex-start' => __('Start', 'elementor'),
                    'flex-end' => __('End', 'elementor'),
                    'center' => __('Center', 'elementor'),
                    'space-between' => __('Space Between', 'elementor'),
                    'space-around' => __('Space Around', 'elementor'),
                    'space-evenly' => __('Space Evenly', 'elementor'),
                ],
                'selectors' => [ // Zde se předají data do CSS
                    '{{WRAPPER}} .elementor-row' => 'justify-content: {{VALUE}};',
                ],
            ]
        );
    }
}
```

### Tested on

[](#tested-on)

**Minimal requirements**

VersionPHP7.1WordPress5.5

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~373 days

Total

3

Last Release

1213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c5e95c6ba19e227e7dbc899b8f9e2d5cac35da4ed8e35476f5478d4aad33dca?d=identicon)[JayJay666](/maintainers/JayJay666)

---

Top Contributors

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

---

Tags

wordpresswpwordpress pluginWP Pluginwordpress plugin developmentWordPress Plugin ValidatorWordPress Plugin Validator RequirementsWordPress Plugin Validator Requirements CheckerWordPress Requirements CheckerWordPress Requirements

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jayjay666-wp-requirements-checker/health.svg)

```
[![Health](https://phpackages.com/badges/jayjay666-wp-requirements-checker/health.svg)](https://phpackages.com/packages/jayjay666-wp-requirements-checker)
```

###  Alternatives

[varunsridharan/wp-dependencies

Provides Function To Check if a plugin is active/inactive &amp; function to compare versions.

1032.5k1](/packages/varunsridharan-wp-dependencies)[rilwis/meta-box

The most powerful &amp; comprehensive plugin to create, manage, show and connect dynamic data with forms and custom fields effortlessly on WordPress.

1.2k1.8k1](/packages/rilwis-meta-box)[renakdup/simple-dic

Simple DI Container with autowiring for your WordPress application with NO dependencies.

101.8k1](/packages/renakdup-simple-dic)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)[typisttech/wp-admin-notices

A simplified OOP implementation of the WordPress admin notices

141.2k](/packages/typisttech-wp-admin-notices)

PHPackages © 2026

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