wpdesk / wp-basic-requirements
There is no license information available for the latest version (3.8.2) of this package.
3.8.2
2026-01-12 10:42 UTC
Requires
- php: >=5.3
Requires (Dev)
- php: >=5.5
- 10up/wp_mock: *
- mockery/mockery: *
- phpunit/phpunit: ^8
- wimg/php-compatibility: ^8
- wpdesk/wp-code-sniffer: ^1.2
This package is auto-updated.
Last update: 2026-07-02 21:58:08 UTC
README
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(); }