wpdesk/wp-basic-requirements

There is no license information available for the latest version (3.8.2) of this package.

Maintainers

Package info

github.com/WP-Desk/wp-basic-requirements

pkg:composer/wpdesk/wp-basic-requirements

Transparency log

Statistics

Installs: 78 321

Dependents: 4

Suggesters: 0

Stars: 0

Open Issues: 0

3.8.2 2026-01-12 10:42 UTC

README

pipeline status coverage report Latest Stable Version Total Downloads Latest Unstable Version License

WP Basic Requirements

wp-basic-requirements is a small library for WordPress plugins that checks whether the environment meets defined requirements and can display an admin notice when it does not.

It supports checks for:

  • minimum PHP version
  • minimum WordPress version
  • required plugins
  • required repository plugins
  • required classes
  • required PHP modules

Requirements

PHP 5.3 or later.

Installation via Composer

In order to install the bindings via Composer run the following command:

composer require wpdesk/wp-basic-requirements

Example usage

Use the following code in the main plugin file:

<?php

$requirements_checker = ( new WPDesk_Basic_Requirement_Checker_Factory )->create_from_requirement_array(
    __FILE__,
    'Example plugin name',
    [	
        'php'     => '7.0',
        'wp'      => '6.0',
        'plugins' => [
            [
                'name'      => 'woocommerce/woocommerce.php',
                'nice_name' => 'WooCommerce',
                'version'   => '8.0',
            ],
        ],
    ]
);

if ( $requirements_checker->are_requirements_met() ) {
    // plugin stuff goes here
} else {
    $requirements_checker->render_notices();
}