=== CompatNav – PHP Upgrade Checker ===
Contributors: mouadwp
Tags: php, compatibility, upgrade, php version, scanner
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Know before you upgrade PHP: finds code in your plugins and themes that will break or show notices on PHP 8.0 to 8.5. Runs on your own server.

== Description ==

Before you or your host move your site to a newer PHP version, CompatNav reads the code of every installed plugin and theme and tells you, in plain words, what will break and what will only show deprecation notices.

Documentation and guides: [compatnav.com](https://compatnav.com)

= What you get =

* **One clear answer.** "Safe to upgrade to PHP 8.5", or "Not ready yet" with a short "What to do first" list.
* **Checks for PHP 8.0 to 8.5.** 58 checks for the changes each PHP version brings, from removed functions to new deprecations. You choose the version you plan to move to.
* **Only what changes for your site.** CompatNav compares the PHP version your site runs today with the one you choose, and reports only what changes between the two.
* **Few, meaningful results.** Each check looks for exact code patterns, and code that is already protected (by a PHP version check or `function_exists()`) is not reported. On three of the most-installed plugins (about 7,800 PHP files together), it reports 27 items for an upgrade from PHP 7.4 to 8.5 (tested in September 2026), all of them deprecation notices, each checked by hand.
* **Next steps you can act on.** For each plugin and theme: whether an update is available, whether the code looks like your own, a plain explanation of each issue, and a before/after example for whoever maintains the code.
* **Reports to share.** Download a self-contained HTML report (opens in any browser, can be printed to PDF) or a CSV file.
* **Built not to hang.** The scan runs in short background steps with a progress bar, and you can pause, resume or cancel it. A file too heavy for your server's memory is skipped and listed, and the scan continues. On a test site with 17 plugins and themes (8,374 PHP files), a full scan took about 70 seconds.

= Private by design =

* The scan runs entirely on your own server. No code, file names or results are sent anywhere, and CompatNav makes no external requests.
* It only reads files. It never runs or changes the code it checks.
* It stores only scan results (file paths, line numbers, check IDs), never personal data.

= Honest about its limits =

CompatNav reads code; it does not run it. Some problems only appear when code runs with real data, and no code reader can see those. Files that could not be checked are listed with the reason, and while any active file could not be checked, the verdict never says "Safe to upgrade".

= Documentation and guides =

The [CompatNav website](https://compatnav.com) explains how to read the report and what to do when a plugin isn't ready yet, with plain guides to PHP upgrades: PHP 8.2's end of life, what changes in PHP 8.4 and 8.5, and how to fix a critical error after a PHP update.

= Libraries =

CompatNav includes [PHP-Parser](https://github.com/nikic/PHP-Parser) by Nikita Popov (BSD 3-Clause license), copied under CompatNav's own namespace so it can never clash with another plugin's copy.

== Installation ==

1. In your WordPress admin, go to Plugins → Add New Plugin and search for "CompatNav", or upload the zip file.
2. Activate the plugin.
3. Go to Tools → CompatNav. Next to "Check readiness for", choose the PHP version you plan to upgrade to, then click "Start scan".

== Frequently Asked Questions ==

= Does CompatNav change my code? =

No. It only reads the files of your plugins and themes. It never changes them, never runs them, and never applies fixes. The report explains each issue and shows a before/after example for whoever maintains the code.

= Does any data leave my site? =

No. The scan and the report are made entirely on your own server, and CompatNav makes no external requests. The "update available" information comes from WordPress's own update check, which is already stored on your site.

= Why so few results? =

CompatNav reports only what changes when you move from your current PHP version to the one you chose, and only exact patterns, so it does not flag code that is fine. Code that already protects itself with a version check is not reported either. Well-maintained plugins often have nothing to report. The report always shows how many files were checked, so few results means good news, not a skipped scan.

= What about files that could not be checked? =

They are listed in the report with the reason, for example a file that already contains a syntax error, or one that is too large or too complex for your server's memory. Such a file may hide a problem, so while any active file could not be checked, the verdict says "Nothing found that will break" together with the number of files that could not be checked, never "Safe to upgrade".

= Does it work on multisite? =

Yes. On a multisite network only super admins can use CompatNav, because plugins, themes and the PHP version are shared by the whole network. The report is made per site, and "active" means active on that site.

= Which PHP versions does it support? =

It checks upgrades to PHP 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5. CompatNav itself needs PHP 7.4 or newer and WordPress 6.0 or newer. If your site still runs PHP 7.2 or 7.3, ask your host to move it to PHP 7.4 first (current WordPress needs PHP 7.4 too), then use CompatNav to prepare the move to PHP 8.

== Screenshots ==

1. The verdict when nothing active will break.
2. The verdict when something needs attention, with the "What to do first" list.
3. One plugin opened: the recommended next step, each issue in plain words, and the details for developers.
4. The downloadable HTML report.

== Changelog ==

= 1.0.0 =
* First release.
