PHPackages                             alessandrotesoro/wp-diagnostics - 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. alessandrotesoro/wp-diagnostics

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

alessandrotesoro/wp-diagnostics
===============================

Utility library to handle detection of minimum system requirements in WordPress plugins.

0.1.0(5y ago)27GPL-3.0-or-laterPHPPHP &gt;=7.2

Since May 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alessandrotesoro/wp-diagnostics)[ Packagist](https://packagist.org/packages/alessandrotesoro/wp-diagnostics)[ RSS](/packages/alessandrotesoro-wp-diagnostics/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

[![tests](https://github.com/alessandrotesoro/wp-diagnostics/workflows/Tests/badge.svg)](https://github.com/alessandrotesoro/wp-diagnostics/workflows/Tests/badge.svg)[![license](https://camo.githubusercontent.com/51257bf8075eeb9acee0800e15bac12632a0c19e3de7f569f050f8a0e19a64a7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c657373616e64726f7465736f726f2f77702d646961676e6f7374696373)](https://camo.githubusercontent.com/51257bf8075eeb9acee0800e15bac12632a0c19e3de7f569f050f8a0e19a64a7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c657373616e64726f7465736f726f2f77702d646961676e6f7374696373)

ℹ️ About WP Diagnostics
-----------------------

[](#ℹ️-about-wp-diagnostics)

WP Diagnostics is a utility library to handle detection of minimum system requirements in WordPress plugins.

✨ Benefits
----------

[](#-benefits)

1. Validate PHP Version, WordPress version, active plugins, php extensions, class existance or use custom callbacks.
2. Support for custom requirements validators.

✅ Requirements
--------------

[](#-requirements)

1. PHP 7.2 or higher.
2. Composer

📖 Usage
-------

[](#-usage)

#### 1. Installation

[](#1-installation)

```
composer require alessandrotesoro/wp-diagnostics
```

#### 2. Basic usage

[](#2-basic-usage)

1. Create an instance of `Sematico\Diagnostics\Runner`.
2. Add checks using the `addCheck` method.
3. Verify that requirements are satisfied using the `satisfied` method.
4. Display an admin notice using the `printNotice` method if requirements are not met.

**Example**:

```
