PHPackages                             eduardovillao/wp-since - 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. eduardovillao/wp-since

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

eduardovillao/wp-since
======================

Check WordPress plugin compatibility by analyzing used functions, classes, hooks and comparing against the minimum required WP version.

v1.5.0(1mo ago)784.3k↓35.4%2[2 issues](https://github.com/eduardovillao/wp-since/issues)MITPHPPHP &gt;=7.4CI passing

Since Apr 8Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/eduardovillao/wp-since)[ Packagist](https://packagist.org/packages/eduardovillao/wp-since)[ RSS](/packages/eduardovillao-wp-since/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (6)Dependencies (6)Versions (12)Used By (0)

WP Since
========

[](#wp-since)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)[![Code Style: PSR-12](https://camo.githubusercontent.com/88796f43286701cea418d9a43a72f4ca39b769304bd5c189e3a73b4e61edf93f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d5053522d2d31322d626c7565)](https://www.php-fig.org/psr/psr-12/)[![Tests](https://camo.githubusercontent.com/d940ad7f0752e2cbe0d63c50dcebf329078807390051c41fe63258f1b5c4e182/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d70617373696e672d627269676874677265656e)](./tests)

**Make sure your plugin works with the right WordPress version — automatically.**
Scans your WordPress plugin to detect all used core symbols and validates them against their official @since versions for accurate compatibility checks.

✨ How It Works
--------------

[](#-how-it-works)

Ever struggled to define the correct minimum WordPress version for your plugin?

Worried about accidentally using functions or APIs that don’t exist in declared minimum WP version?

`wp-since` helps you avoid those headaches by automatically analyzing your plugin’s code and checking compatibility against real WordPress versions.

### Here’s what it does:

[](#heres-what-it-does)

- 🧠 Scans your plugin for used:
    - Functions
    - Classes
    - Class methods (static and instance)
    - Action and filter hooks
- 📖 Reads the declared `Requires at least:` version from your plugin's main file header — or `readme.txt` if the header doesn't set it
- 🗂️ Compares those symbols with a version map built from WordPress core using `@since` tags
- 🚨 Reports any used symbols that require a newer WP version than what’s declared

### Example Output

[](#example-output)

Let’s say your plugin uses `register_setting()` (introduced in WP `5.5`), but your `readme.txt` declares compatibility with WordPress `5.4`:

```
✅ Minimum version declared: 5.4 (from readme)

🚨 Compatibility issues found:

┌─────────────────────────────┬──────────────────┐
│ Symbol                      │ Introduced in WP │
├─────────────────────────────┼──────────────────┤
│ register_setting (function) │ 5.5.0            │
└─────────────────────────────┴──────────────────┘

📌 Suggested version required:  5.5.0
```

Now imagine your code is fully aligned with your declared version:

```
✅ Minimum version declared: 5.5 (from readme)

✅ All good! Your plugin is compatible with WP 5.5.
```

Simple. Powerful. Automatic.
Because your plugin deserves reliable compatibility.

🚀 Usage
-------

[](#-usage)

**Requirements**

- PHP 7.4+
- Composer

🛠️ Install via Composer (recommended)

```
composer require --dev eduardovillao/wp-since
```

▶️ Run the compatibility check

```
./vendor/bin/wp-since check ./path-to-your-plugin
```

By default the minimum WordPress version is detected automatically from your plugin header or `readme.txt`. To override it, pass `--min-wp-version`:

```
./vendor/bin/wp-since check ./path-to-your-plugin --min-wp-version=6.0
```

### 🧹 Ignore Files &amp; Folders

[](#-ignore-files--folders)

By default, wp-since scans all `.php` files in your plugin directory.

But what about files that don’t make it into your final plugin zip — like tests or dev tools? No worries — wp-since respects your ignore rules.

**Supported ignore sources:**

- `.distignore`
- `.gitattributes` with `export-ignore`

If any of those files are present, wp-since will automatically ignore the listed files or folders during analysis — just like svn export or plugin deployment.

Example: .gitattributes

```
/tests/              export-ignore
/tools/debug.php     export-ignore
```

Example: .distignore

```
/tests
/tools/debug.php
```

> These paths will be excluded from compatibility checks. This helps avoid false positives caused by test or development files.

### 📝 Inline Ignore

[](#-inline-ignore)

You can ignore specific lines from the scan by adding a special inline comment.

This is useful when you conditionally use a newer function but know it’s safe, like:

```
if (function_exists('wp_some_new_func')) {
    return wp_some_new_func(); // @wp-since ignore
}
```

> Only inline comments on the same line will be considered — comments above the line won’t trigger ignores.

🛠️ Coming Soon
--------------

[](#️-coming-soon)

- GitHub Action integration
- HTML/Markdown reports
- Export for CI/CD pipelines

📜 License
---------

[](#-license)

MIT © [Eduardo Villão](https://github.com/eduardovillao)
Use freely, contribute gladly.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.8% 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 ~92 days

Recently: every ~115 days

Total

6

Last Release

38d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9baa2c0efca2d86680b10574a6c2cda12a37ae61719c2f596f581db3ceb9bc5?d=identicon)[eduvillao](/maintainers/eduvillao)

---

Top Contributors

[![eduardovillao](https://avatars.githubusercontent.com/u/60461940?v=4)](https://github.com/eduardovillao "eduardovillao (66 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (3 commits)")[![arnaudbroes](https://avatars.githubusercontent.com/u/18156697?v=4)](https://github.com/arnaudbroes "arnaudbroes (1 commits)")

---

Tags

code-analysiscompatibilitydeveloper-toolsstatic-analysiswordpresswordpress-developmentwp-plugin

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/eduardovillao-wp-since/health.svg)

```
[![Health](https://phpackages.com/badges/eduardovillao-wp-since/health.svg)](https://phpackages.com/packages/eduardovillao-wp-since)
```

###  Alternatives

[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M297](/packages/deptrac-deptrac)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

192484.7k41](/packages/brianhenryie-strauss)[boundwize/structarmed

Configurable PHP architecture guards — define your layers and rules, then keep them enforced

45751.2k24](/packages/boundwize-structarmed)[v.chetkov/php-clean-architecture

PHP Clean Architecture

14661.8k](/packages/vchetkov-php-clean-architecture)

PHPackages © 2026

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