=== Guardian – Conflict Detector & Safe Updates ===
Contributors: trucetech
Tags: conflict detector, plugin conflict, troubleshooting, plugin health, safe updates
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Detect plugin and theme conflicts before they break your site, with health scores, bloat checks, and safe one-click rollbacks.

== Description ==

**Guardian** is a safety net for your WordPress site. It scans your active plugins and theme for the conflicts that quietly break sites, scores how well-maintained your plugins are, helps you pinpoint the culprit when something goes wrong, and lets you roll back a bad update with one click.

Most conflict tools only help *after* a site breaks. Guardian is built around three ideas: **prevent, detect, recover.**

**What it detects**

* Duplicate shortcodes registered by more than one plugin
* Duplicate custom post types and taxonomies
* Duplicate REST API routes
* Duplicate AJAX actions
* Duplicate script and stylesheet handles
* Order-sensitive hook collisions (e.g. two plugins fighting over `the_content`, `template_redirect`, or WooCommerce checkout)
* Cron events scheduled multiple times
* Known incompatibilities — two caching plugins, two security/firewall plugins, two SEO plugins, and more
* Duplicate WooCommerce payment gateways

Every issue gets a **severity score (1–10)**, a plain-English explanation of what can go wrong, and a recommended fix.

**Plugin Health Score**

Guardian rates each active plugin out of 100 using public data from WordPress.org — last update date, active installs, ratings, support resolution rate, and compatibility with your WordPress and PHP versions — so you can spot abandoned or risky plugins.

**Performance / Bloat scanner**

See how much autoloaded data is loaded on every request, which plugins weigh the most, how many scheduled tasks are running, and your largest autoloaded options.

**Binary-search troubleshooter**

Disable plugins for *your session only* to find a conflict fast. Visitors keep seeing the live site the whole time. Disable half, reload, narrow down — the classic bisection method, built in.

**One-click rollback**

When enabled, Guardian copies a plugin's files and settings just before WordPress updates it. If an update breaks something, restore the previous version in one click.

**Lightweight by design**

Scans run as scheduled background jobs and are cached. Nothing heavy ever runs on a normal front-end page load.

= A note from TRUCE LABEL =

Guardian is built by [TRUCE LABEL](https://trucelabel.com).

If you publish video, take a look at our **Video Ads Player** — a fast, VAST-ready WordPress video player with pre-roll, mid-roll, post-roll, and banner ads, so you can monetize the videos you already have. [Learn more](https://checkout.freemius.com/plugin/31537/plan/51775/?trial=paid).

== Installation ==

1. Go to **Plugins → Add New** and search for "Guardian", or upload the plugin ZIP.
2. Click **Install Now**, then **Activate**.
3. Open **Guardian** in the admin menu and click **Run a full scan**.
4. Review any conflicts, check plugin health, and adjust options under **Settings**.

== Frequently Asked Questions ==

= Will scanning slow down my site? =
No. Scans run on a schedule in the background and the results are cached. The front end is never used to run a scan.

= Does troubleshooting affect my visitors? =
No. Disabling plugins in the troubleshooter applies only to your own browser session, scoped by a secure cookie. Everyone else continues to see the site normally.

= What data does the plugin send anywhere? =
Only the Plugin Health feature makes an external request, and only to the public WordPress.org plugin information API — the same source the built-in Plugins screen uses — to read each plugin's last-updated date, install count, ratings, and compatibility. No information about your site or its visitors is transmitted.

= Does it work with WooCommerce and multisite? =
Yes. Guardian includes WooCommerce-specific checks and is multisite aware.

= Is it really free? =
Yes. This plugin is fully functional and free under the GPL.

== External services ==

This plugin connects to the **WordPress.org Plugin API** (https://api.wordpress.org/) when you use the Plugin Health feature. It sends the slug of each active plugin in order to retrieve that plugin's public maintenance data (last update, install count, ratings, tested-up-to, required PHP). No personal data or site data is sent. See the WordPress.org privacy policy: https://wordpress.org/about/privacy/.

== Screenshots ==

1. Overview dashboard with risk summary and a one-click scan.
2. Conflict report with severity scores and recommended fixes.
3. Plugin Health scores pulled from WordPress.org.
4. Performance and bloat breakdown.
5. Binary-search troubleshooter (session-only plugin disabling).
6. One-click rollback from automatic pre-update backups.

== Changelog ==

= 1.0.0 =
* Initial release: conflict scanner, plugin health score, bloat scanner, binary-search troubleshooter, fatal-error monitor, and pre-update backups with one-click rollback.

== Upgrade Notice ==

= 1.0.0 =
First public release of Guardian.
