PTI Link Health Auditor

Description

PTI Link Health Auditor is a modular WordPress plugin built to discover, extract, normalize, deduplicate, verify, and repair link references across your published WordPress posts and pages.

With built-in live HTTP status verification, automated WP-Cron background scanning, and in-dashboard link repair, it helps administrators keep site links healthy and up to date without leaving the WordPress dashboard.

Features

  • Content Discovery & Batch Scanning: Scans published WordPress posts and pages in bounded batches (25, 50, or 100 records) to prevent server timeouts and memory exhaustion. Excludes drafts, revisions, trash, scheduled, and private content.
  • Comprehensive URL Extraction: Extracts URLs from HTML anchor elements (<a>), images (<img> src), and responsive picture sets (srcset) using native DOMDocument parsing with regex fallback.
  • RFC 3986 URL Normalization: Resolves relative, root-relative, and protocol-relative URLs against source post permalinks according to RFC 3986. Filters out non-web schemes (mailto:, tel:, javascript:, data URIs, anchor-only #).
  • Two-Level Deduplicated Inventory: Provides a flat unique URL inventory with occurrence counts while maintaining a full reference log linking every URL back to its source posts and HTML elements.
  • Live HTTP Status Checking: Verifies external and public HTTP/HTTPS URLs using WordPress Core safe HTTP APIs (wp_safe_remote_head with fallback to wp_safe_remote_get), including SSRF protections against private, loopback, and reserved IP ranges.
  • Accurate Link Classification: Identifies working links (200 OK / 2xx / 304), broken links (404 Not Found, 410 Gone, 500+ Server Errors, DNS/connection failures), redirects (301, 302, 303, 307, 308 with destination targets and hop counts), and warnings (401 Unauthorized, 403 Forbidden, 429 Too Many Requests, SSL certificate issues, timeouts).
  • Sequential Batch Verification: Checks links in configurable micro-batches (5, 10, or 20 URLs) with a live progress bar.
  • On-Demand Single Link Checking: Check or re-verify individual links directly from the results table.
  • Persistent Custom Database Storage: Discovered link inventories and live verification results are saved to dedicated custom tables ({prefix}ptiwebtech2025_lha_links and {prefix}ptiwebtech2025_lha_references), preserving your data across page refreshes and sessions.
  • Automated WP-Cron Background Scans: Schedule recurring scans (Hourly, Twice Daily, Daily, Weekly) to run in the background via WordPress WP-Cron.
  • Interactive Background Worker: Process large inventories in non-blocking micro-batches with Pause, Resume, and Cancel controls.
  • In-Dashboard Single Link Repair: Edit and replace broken or outdated links directly within specific posts without opening the WordPress editor.
  • 1-Click Apply Redirect Target: Update redirected links (301/302) to point directly to their final destination target URL in one click.
  • Bulk URL Replacement: Replace a URL across all posts and pages where it occurs in one unified action.
  • Quick Unlink: Strip dead or unwanted <a> tags cleanly while keeping anchor text and nested formatting intact.
  • Gutenberg Block Preservation: Safely updates post content and Gutenberg block comment JSON attributes without triggering block recovery errors.
  • Immediate Re-Verification: Repaired HTTP/HTTPS links are automatically re-verified against live endpoints with instant UI badge updates.
  • Interactive Filtering & Search: Filter by HTTP Status (Working, Broken, Redirects, Warnings, Unchecked) or element type (<a>, <img>, srcset) with instant live search.
  • Configurable Scanner Settings: Tailor discovery batch sizes, HTTP verification concurrency, and connection timeouts to match your web host.
  • Database Reset & Clean Uninstall: One-click clear database option to reset stored inventories, plus complete cleanup of custom tables, options, transients, and scheduled events upon uninstall (including Multisite).

Usage & Configuration

Configuration

Click the Settings (gear) button on the Link Health Auditor dashboard to configure:
* Automated Scan Frequency (WP-Cron): Choose Manual Only (Disabled), Once Hourly, Twice Daily, Once Daily, or Once Weekly.
* Content Discovery Batch Size: Choose 25, 50 (Recommended), or 100 posts per batch.
* HTTP Verification Micro-Batch Size: Choose 5 (Safe / Shared Hosts), 10 (Recommended), or 20 URLs per batch.
* HTTP Connection Timeout: Set the maximum wait time per HTTP check (3 to 60 seconds, default 10).
* Auto-Verify: Toggle whether HTTP verification starts automatically after background discovery completes.

Scanning & Interpreting Results

  1. Click Discover URLs to extract and normalize URLs from published posts and pages.
  2. Click Verify Discovered URLs (or Check / Recheck on an individual row) to check live HTTP status.
  3. Status categories:
    • Working: HTTP 2xx responses (such as 200 OK) and 304 Not Modified.
    • Redirects: HTTP 301, 302, 303, 307, or 308 responses, showing the final resolved destination URL and hop count.
    • Broken: HTTP 404, 410, 5xx server errors, redirect loops, DNS failures, or refused connections.
    • Warnings: HTTP 401, 403, 429, SSL certificate errors, connection timeouts, or blocked unsafe redirects.
    • Unchecked / Non-Web: Links not yet verified, or non-HTTP schemes (mailto:, tel:, javascript:, # placeholders).

Repairing, Updating Redirects, and Unlinking

  • Repair Single Link: Click Repair on a row in Discovered References to edit the URL in that specific post.
  • Bulk Replace URL: Switch to Unique URL Inventory and click Repair All to replace the URL across all matching posts.
  • Apply Redirect Target: On redirected links, click Apply 301/302 (single or bulk) to update the source content directly to the final destination URL.
  • Unlink: Click Unlink (or Unlink All) on anchor links to remove the <a> tag while preserving the anchor text and inner HTML.

Third-Party / External Services & Privacy

This plugin makes outbound HTTP requests from your WordPress server using WordPress Core safe HTTP APIs (wp_safe_remote_head and wp_safe_remote_get) solely to verify the availability and HTTP status of HTTP/HTTPS URLs discovered in your published content.

  • Destinations contacted: Outbound HTTP/HTTPS requests are sent directly to the target hostnames of URLs discovered in your published posts and pages, as well as any HTTP redirect destinations (Location headers) returned by those servers (up to 5 hops by default). Requests to private, loopback, link-local/metadata, and reserved IP ranges are blocked for SSRF protection.
  • When requests occur: Outbound requests are initiated only when an administrator triggers link verification manually (Verify Discovered URLs, Check / Recheck, Background Scan, or post-repair re-verification) or when scheduled background verification runs via WP-Cron (disabled by default until configured).
  • Data transmitted: Making an HTTP request to a remote server inherently discloses your WordPress server’s outbound IP address, the requested URL (domain, path, and query string), and standard HTTP request headers (User-Agent: Mozilla/5.0 (compatible; PTILinkHealthAuditor/1.0.0), Accept, and Range: bytes=0-1024 on GET fallback). Administrators should ensure that published content does not rely on sensitive query tokens in URLs if they do not wish those URLs to be requested during link checks.
  • Local storage & retention: Discovered URLs, source post IDs, titles, permalinks, edit URLs, anchor/alt text, element snippets, HTTP status codes, redirect destinations, response times, and scan settings/timestamps are stored locally in your own WordPress MySQL database ({prefix}ptiwebtech2025_lha_links, {prefix}ptiwebtech2025_lha_references, and wp_options). You can erase stored link records at any time using the Clear All Stored Data button, and all plugin tables, options, transients, and scheduled hooks are removed upon plugin deletion.
  • Developer telemetry: The plugin does not send telemetry, usage statistics, or site data to the plugin authors or any external tracking service.

Screenshots

Installation

  1. Upload the pti-link-health-auditor folder to the /wp-content/plugins/ directory, or install the plugin .zip file directly through Plugins > Add New > Upload Plugin.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Navigate to Link Health Auditor in the WordPress admin sidebar menu.
  4. Click the gear icon (Scan & Schedule Settings) if you want to configure batch sizes, connection timeouts, or automated WP-Cron scheduling.
  5. Click Discover URLs to scan your published content, or Background Scan to run discovery and verification automatically.

FAQ

Does this plugin check whether links are working or broken?

Yes. The HTTP Link Verification engine tests discovered HTTP/HTTPS URLs using wp_safe_remote_head (falling back to wp_safe_remote_get when HEAD is rejected) and reports live HTTP status codes, redirects, timeouts, and connection errors.

Can I fix broken links directly from the plugin table?

Yes. The plugin provides direct in-dashboard link editing, 1-click redirect target updating, bulk URL replacement across posts, and clean unlinking without having to open each post in the WordPress editor.

Does it check drafts or private posts?

No. The discovery engine strictly queries published posts and pages (post_status => 'publish'). Drafts, revisions, private, scheduled, and trashed posts are excluded.

Do discovered links and HTTP checks persist after page reload?

Yes. Discovered links and verification results are saved in dedicated database tables ({prefix}ptiwebtech2025_lha_links and {prefix}ptiwebtech2025_lha_references) and reload automatically when you open the dashboard.

How does it handle large sites?

Both content discovery and link verification operate in bounded batches with progress indicators to prevent server timeouts and high memory usage. You can also run non-blocking background scans or schedule recurring WP-Cron scans.

What data does this plugin send to external servers?

The plugin does not send telemetry or site data to the plugin developers. However, verifying links requires your WordPress server to send HTTP HEAD/GET requests to the remote servers hosting the URLs found in your published posts (and any redirect targets). Those remote servers receive your server’s IP address, the requested URL, and standard User-Agent/Accept HTTP headers.

What are the requirements and where can I get support?

PTI Link Health Auditor requires WordPress 6.4 or higher and PHP 7.4 or higher (with the PHP dom extension recommended for HTML parsing, and a built-in regex fallback if unavailable). For support, bug reports, or questions, please use the official WordPress.org plugin support forum.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“PTI Link Health Auditor” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial public release.
  • Automated content discovery across published posts and pages in bounded batches.
  • Deep URL extraction from anchor links (<a>), image sources (<img>), and responsive picture sets (srcset).
  • RFC 3986 relative URL resolution and two-level deduplication inventory preserving source references.
  • Safe HTTP status verification engine supporting wp_safe_remote_head with wp_safe_remote_get fallback and SSRF protections.
  • Accurate detection of working links (200), broken links (404/5xx), redirects (301/302), and warnings (403/SSL/timeouts).
  • Dedicated MySQL tables for persistent storage across sessions and Multisite support.
  • Automated background scanning via WP-Cron (Hourly, Twice Daily, Daily, Weekly).
  • Non-blocking background worker with interactive Pause, Resume, and Cancel controls.
  • In-dashboard single link repair and 1-click redirect target replacement without opening the editor.
  • Bulk URL replacement across multiple posts.
  • Clean anchor unlinking preserving inner text and child HTML formatting.
  • Gutenberg block comments and attributes preservation.
  • Instant re-verification of repaired HTTP/HTTPS URLs with real-time UI badge updates.
  • Interactive status filtering and instant search.
  • Configurable scan settings modal and one-click database reset tool.