A really simple link checker. Never have a stale link again.
Description
This plugin checks all the links on your site. It mostly works in the background, but notifies you when it finds broken links.
Background operations
The link checker plugin executes a background job regularly, which looks for pages to scan for links, and links to check.
Scans and checks are done in batches, so the job doesn’t run for too long.
Post scanning
Posts are scanned for links whenever they’re saved, so it happens immediately. The links are not checked immediately, but simply stored.
This means the queue of posts to scan will normally be empty, unless the plugin is recently activated or many posts have been imported in bulk.
Link checks
Links are checked regularly, as they can go stale for any reason at any time.
Checks are performed by doing a simple HTTP GET request. They happen in the background job, in batches, so if there are many links to check it can take a while to get through the queue.
The check status of a link can be one of:
- Unchecked — newly discovered link that is still in the queue;
- Good — the link works (HTTP status 2xx);
- Redirect — the links redirects somewhere else (HTTP status 3xx);
- Broken — the links gives an error (HTTP status 4xx or 5xx or network problems);
- Dismissed — an errors has been dismissed by an editor;
- Blacklisted — the link is on the blacklist and won’t be checked.
Notification
Where there are broken links, a notification is made on the admin interface.
The At-A-Glance dashboard widget will show “NN broken links”.
The RS Link Checker dashboard widget always give an overview of how man posts are in each check status group.
If the background job registers an increase in the number of broken links, it sends an email to the administrator.
Managing the links
A management page under the Tools menu lists the links, either all of them or separate by check result status.
It is possible to browse and search all the registered links.
The table shows for each link:
- The URL — if clicked opens in another window or tab
- The HTTP status code with 999 for network problems
- The HTTP message or network error message
- The time for next scheduled check of the link
- The posts where the link appears, separate for each post type, with links to the admin post lists for that post type
- And if there are redirecting links, where they redirect.
There are actions associated with each row:
- Edit URL — prompts for a new URL and replaces it in the posts
- Recheck — run the check immediately
- Update — update a redirecting link in the posts with it
- Dismiss — dismiss a broken link which can be fixed
- UnDismiss — remove the dismissed status from a link
These actions can also be performed in bulk on many links at a time.
Data storage
This plugin doesn’t create any new tables. All the data about the links are simply kept in a private taxonomy which associates the links with the posts they’re found in.
Additional data are stored in meta fields on the terms of the taxonomy.
Settings
The plugin adds a ‘RS Link Checker’ sub-menu under Settings. Here there are options for:
- How often to schedule the background job checking links (default never);
- Which post types to check links on (default posts and pages);
- Whether to check synced patterns too (default off);
- Which post statuses to consider (default published);
- The batch size for background scanning of posts for links (default 20);
- How often to recheck links (default once a week);
- The batch size for background checking of links (default 20);
- A blacklist of URL prefixes to ignore (default empty);
- Timeout for the HTTP requests when checking a links (default 5 seconds);
- Eventual User-Agent to use;
- Whether to log background activities to the PHP log (default true).
WP-CLI
The plugin has an elaborate WP-CLI interface under the link-checker
command, where most operations can be performed.
Changelog
1.0
- First version
Screenshots
The only visible parts of this plugin are the broken link notifications and a status dashboard widget.
Download
This plugin requires the RS Base Plugin to work: Download stable version 1.14.11.
Leave a Reply