=== BrokenLinkChecker.app – Broken Link & Image Checker ===
Contributors: liujd
Tags: broken link checker, broken links, dead links, broken images, 404
Requires at least: 6.2
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

Lightweight broken link and image checker with smart 403 anti-false-positive detection, inline URL fixing, and low-load background scanning.

== Description ==

**BrokenLinkChecker.app** helps you find and fix broken links, broken images, and redirect chains in your WordPress posts and pages without slowing down your site or flooding your dashboard with false 404 alerts.

Traditional WordPress link checkers either strain shared hosting CPUs, bloat `wp_options`, or falsely flag perfectly healthy links to Cloudflare-, Amazon-, Akamai-, or LinkedIn-hosted pages as broken whenever those sites return HTTP `403`, `429`, `503`, or `999`. BrokenLinkChecker.app separates true dead links from bot-protected URLs automatically.

= Key Features =

* **Zero Friction, Zero Nagging:** No account registration, no credit card, and no admin-wide promotional banners.
* **Smart 403 Anti-False-Positive Classifier:** Automatically categorizes every URL into six clear buckets:
  * **Broken** — confirmed 404 / 410 errors, DNS failures, connection failures, redirect loops, and SSL errors.
  * **Bot-Protected** — HTTP 403 / 429 / 503 / 999 responses matching Cloudflare, Akamai, DataDome, PerimeterX, Imperva, Sucuri, Amazon, LinkedIn, or rate limits. Never mislabeled as dead links.
  * **Redirects** — HTTP 301 / 302 / 307 / 308 chains with hop counts and the final destination URL recorded.
  * **Broken Images** — missing `<img>` assets (404/410), empty files, or image URLs returning non-image MIME types such as `text/html`.
  * **Timeouts** — slow or temporarily unavailable servers flagged for a quick retry.
  * **OK** — verified healthy `2xx` responses.
* **Dedicated Custom Database Tables:** Stores deduplicated URLs and post occurrences in `{$wpdb->prefix}blca_links` and `{$wpdb->prefix}blca_occurrences` with proper indexes — never bloats `wp_options` or `wp_postmeta`. Optional full cleanup on uninstall.
* **Low-Load Background Queue:** Processes posts with cursor pagination and checks links in small, configurable batches (default 15 per batch) with execution time budgets, memory guardrails, and polite inter-request delays. Supports both WP-Cron background processing and a live Ajax progress bar.
* **Fix Links Without Leaving the Dashboard:**
  * **Inline URL Editor** — replace a broken or redirected URL across all affected posts and immediately recheck the new target (with a one-click helper to adopt the final redirect URL).
  * **One-Click Unlink** — cleanly remove broken `<a>` wrappers while preserving the exact anchor text and inline formatting.
  * **Ignore / Unignore** — mute links you intentionally keep.
  * **Single-Link Recheck** — re-verify any individual link on demand.
* **Security-First Engineering:** Strict SSRF protection blocks private, loopback, link-local, cloud metadata, and reserved IPv4/IPv6 addresses on every request and every redirect hop. All actions enforce WordPress nonces, `manage_options` / `edit_post` capability checks, prepared SQL statements, and escaped outputs.
* **Built-In System Diagnostics:** One-click copyable diagnostic summary (WordPress/PHP versions, scanner configuration, and link totals) containing no secrets or personal data.

= Free Core Scope & Optional Pro Add-on =

The free core plugin scans `<a href>` links and `<img src>` images inside published posts and pages for up to **1,500 unique deduplicated URLs**, with standard WordPress `do_action` and `apply_filters` hooks for developers.

Need cloud-powered off-server scanning with zero local CPU load, automated 403 re-verification, unlimited links, WooCommerce / CPT / ACF / menu / video embed coverage, bulk URL editing, one-click 301 redirects, CSV export, or scheduled Email/Slack/Webhook alerts? Explore the separate optional Pro add-on at [brokenlinkchecker.app/pricing](https://brokenlinkchecker.app/pricing).

== Installation ==

1. Upload the `broken-link-checker-app` folder to the `/wp-content/plugins/` directory, or install the plugin directly through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Navigate to **Broken Links** in your WordPress admin menu.
4. Click **Start Full Scan** to discover and verify links across your published posts and pages.

== Frequently Asked Questions ==

= Will this plugin slow down my website? =

No. Scanning never runs on frontend visitor requests. Discovery uses cursor-paginated queries, and link checks run in small batches (default 15 links per batch) with strict time and memory budgets plus polite inter-request delays. You can adjust batch size, timeout, and delay anytime under **Broken Links -> Settings**.

= Why are 403, 429, or 503 links listed under "Bot-Protected" instead of "Broken"? =

Many major websites protected by Cloudflare, Akamai, DataDome, PerimeterX, Amazon, or LinkedIn block automated server-side HTTP requests while loading fine for real visitors in a browser. Separating them into **Bot-Protected** prevents accidental removal of working affiliate, reference, or partner links.

= Does the free plugin require an account or send my site data to external servers? =

No. The free core plugin operates 100% locally on your WordPress server with zero registration and zero telemetry. It only makes outbound HTTP HEAD/GET requests to the URLs already embedded in your own posts and pages to check whether they respond properly.

= How does Inline URL Editing and Unlink affect my posts? =

Inline editing surgically updates only the matching `href` or `src` attribute inside affected posts without re-serializing unrelated HTML or Gutenberg block comments, then immediately rechecks the updated URL. Unlink removes only the matching `<a>` wrapper while keeping your anchor text and nested inline formatting intact.

= Will uninstalling remove my database tables and settings? =

By default, your scan history and ignored links are preserved so accidental reinstalls do not erase your work. If you want a complete removal, enable **Delete custom database tables and all plugin settings when uninstalling** under **Broken Links -> Settings** before deleting the plugin.

= How does the 1,500 unique link limit work? =

Because URLs are deduplicated across posts in `blca_links`, a URL linked from 50 different posts only counts once toward the 1,500 unique link cap in the free version. Developers and optional add-ons can adjust this via the `blca_max_unique_links` filter.

== Screenshots ==

1. Clean Broken Links dashboard with status summary cards, live Ajax scan progress bar, and standard WordPress list table.
2. Bot-Protected filter tab separating Cloudflare, Amazon, and LinkedIn WAF responses from confirmed broken links.
3. Inline URL editor with one-click final redirect URL adoption and instant live recheck.
4. Settings & System Diagnostics screen with hosting-friendly batch controls and one-click copyable diagnostic info.

== Changelog ==

= 1.0.0 =
* Initial release of BrokenLinkChecker.app free core plugin.
* Added dedicated custom database tables (`blca_links` and `blca_occurrences`) with URL deduplication and opt-in uninstall cleanup.
* Added `<a href>` and `<img src>` extractor for published posts and pages.
* Added low-load batched scan queue with WP-Cron background execution and live Ajax progress tracking.
* Added smart 403 / 429 / 503 / 999 anti-false-positive WAF classifier and strict per-hop SSRF protection.
* Added wp-admin list table with status filters, inline URL editing, one-click Unlink preserving anchor text, Ignore/Unignore, single-link Recheck, and one-click copyable system diagnostics.

== Upgrade Notice ==

= 1.0.0 =
Initial release of BrokenLinkChecker.app – Broken Link & Image Checker.
