Broken Link Checker 0.5 Available

The latest version of Broken Link Checker for WordPress is now available on WordPress.org. If you’re already using the plugin you should get an update notification within 24 hours. Below you’ll find a list of changes and a bit commentary about the update.

Around 20 people downloaded the beta version. I haven’t received any death threats related to that release, so I’m just going to go ahead and presume there are no critical bugs in the new code. But if you do find anything that looks like a glitch feel free to report it in the comment section or via my contact page.

What’s New

  • Check links in bookmarks (AKA the blogroll).
  • Check links in custom fields (optional). You need to list the custom fields you want to be checked in Settings -> Link Checker. At the moment the plugin is only able to parse fields that contain a complete URL and nothing more. Note that when you add a new field to the configuration, it will take a while before the plugin re-parses your posts and detects the field values.
  • Manage all links from one page. You can view, edit or remove broken links, redirects and any other link in any post, custom field or the blogroll, from one page.
  • An all-new dashboard widget that displays status info about broken links. To save dashboard space you can close the widget and configure it to automatically pop open if problematic links are detected (this is actually on by default).
  • Improved database efficiency. For example, information about URLs and places where they are used is now stored separately. This is more elegant and enables some neat features.
  • Check each URL only once per the user-configured period (except broken links that are still double-checked). Previously, the plugin would check links that are used in X different posts X times in a row.
  • Link modifications are applied to all posts automatically. You can edit or delete a link via the plugin’s tab and all the posts, custom fields and bookmarks will be automatically updated to reflect the change.
  • Posts are only re-parsed when they change. Previously the plugin would periodically re-check each post for new links which was wasteful and hurt performance.
  • All received HTTP headers are now included in the detailed log (previously only the last one was shown).
  • Generally more informative logs.
  • You can quickly add URLs to the exclusion list by clicking the “Exclude” button.
  • Added paging support to the link list.
  • Everything runs on jQuery instead of Prototype now.
  • Everything is way more object-oriented now.
  • Everything uses AJAX the “proper” way now by calling admin-ajax.php instead of a separate plugin file.
  • Significantly improved database performance. Some queries are still slow since it’s not practical to put an index on a DATETIME column, but overall the plugin uses the WordPress DB much more efficiently.
  • Sorting features are gone, for now. I’ll probably add a number of sorting options in a later version.
  • Improved UI that’s more in line with WP 2.7 style. For example, most action links in the “Broken Links” tab only show up when you hover over the corresponding row.
  • Links in custom fields or the blogroll get an appropriate icon in the broken link list.
  • The URL editing feature is more elegant and there’s finally a “Cancel” button.
  • More intuitive AJAX behaviour. For example, when an AJAX call completes it will flash the appropriate row green or do something else to indicate that it was successful.
  • No more hidden debug output in HTML comments. I’ve switched to the excellent FirePHP + FireBug debugging combo and it works great.
  • Only one instance of the link checker can be active at one time. Previously it would just plough on, blissfully unaware of race conditions and other related nastiness. This behaviour was probably what caused the mysterious slowdowns and inexplicable bugs that a few users encoutered. Now the worker function uses file locking and will abort if there’s already another worker running.
  • The minimum required WordPress version is now 2.7. If you’re using something older, upgrade or get an older version of the plugin from the wordpress.org archives. Progress marches on, humans.

To-Do

These are the features that will probably be implemented in the relatively near future (i.e. before the winter 😉 ).

  • Result sorting on the “Broken Links” page.
  • Cron support.
  • Some kind of pop-up tooltips for broken links in posts.
  • More optimization, e.g. don’t load the entire plugin when it’s not required.
  • An option to only check internal and/or external links.
  • Localization support.
  • Checking links in comments. Maybe. I’m still not convinced that would be all that useful.

1.0 ?

In conclusion, I’m quite pleased with how the update has turned out. I was really tempted to break away from the fractional versioning scheme I’ve used for this plugin since the beginning and label this the true and complete “1.0” release, but the thought that there will almost certainly be a load of new bugs due to all the major changes made me reconsider. Maybe after all the to-do items are implemented…

By the time it gets to 1.0 this will probably the most powerful and robust plugin I’ve ever created. And then the robot uprising will happen.

Related posts :

67 Responses to “Broken Link Checker 0.5 Available”

  1. Adam Henriksen says:

    Hi, I’m trying to activate your plugin but am getting an error:

    Fatal error: Cannot redeclare maybe_create_table() (previously declared in E:\wwwroot\website.com\www\wp-content\plugins\postie\postie-functions.php:2023) in E:\wwwroot\website.com\www\wp-admin\includes\upgrade.php on line 1009

    It looks like Postie and BLC are using the same function names?

  2. White Shadow says:

    No, they don’t use the same names. In this case, Postie is buggy and tries to define a function with the same name as one that’s already defined in the WordPress core files.

    The reason it only shows up when BLC is activated is because BLC loads and uses that core file – “wp-admin/includes/upgrade.php” – as a part of it’s activation routine. This is the recommended approach for plugins that need to add/upgrade DB tables and not a bug.

    So ask the Postie dev about this error 😉

  3. Adam Henriksen says:

    Thank you for your quick reply and insight into the problem! I’ll contact the Postie developer. Cheers!

    Adam

  4. Adam Henriksen says:

    I got the plugin activated… I re-wrote the Postie plugin to use the recommended approach. Thanks again for your help with that.

    One more question/problem… I am unable to fix links that require a “mailto” URL. For example, when I attempt to correct them using “mailto:someone@domain.com” it throws an invalid URL error. I didn’t see a setting to change this so I’m guessing it’s either a bug or by design?

  5. Adam Henriksen says:

    Same thing happens with “rtsp:” and “rtmp:”. I can fix them manually by editing the post but it sure would be nice to edit them right within the Broken Links page.

  6. White Shadow says:

    It’s a side-effect of the design – the plugin only supports HTTP(S) links. You’ll need to edit the post(s) directly to fix those URLs.

  7. Adam Henriksen says:

    Gotcha.

    BTW, this plugin rocks… I’m sending you some cash-ola. Thanks for your time and hard work on this plugin. I’m converting a very large site from DotNetNuke to WordPress and the plugin identified over 4,000 broken links. Ouch. I was, however, able to run some REPLACE queries against the db and got the count down to 39! Whew! I wouldn’t have known all the issues without your plugin. Thanks again!

  8. White Shadow says:

    Thank you for the donation 🙂

  9. ovidiu says:

    just a question:

    I am using the redirection plugin to take care of changed URLs and automatically set up 301 redirect. Now your plugin is reporting 34 broken links (itnernal ones) because it doesn’t recognize that the redirection plugin is actually redirecting those…

    what do you rekon is the best procedure? manually edit and change all 34 links or beg you to introduce some support for that plugin?

    Or maybe your plugin can check if there is a 301 redirect happening and offer me to auto correct the links to the new location?

  10. White Shadow says:

    Can you direct me to the homepage of that redirection plugin?

    The BLC does check for redirects. I’m guessing that in your case one of two things is happening : either the redirection plugin performs the redirects by dynamically modifying posts when they’re displayed (which wouldn’t be caught by the link checker because it works with the WP database directly), or there’s a bug in my redirect-checking code. Either way I’ll need to test the other plugin myself before I can figure this out.

  11. ovidiu says:

    I’d have included the link to the plugin but I feard my comment would get caught as spam: http://wordpress.org/extend/plugins/redirection

    I appreciate your help with this matter.

  12. Stuart M says:

    I recently moved one of my websites to a new server, and upgraded to WordPress 2.8.4 and Broken Link Checker Version 0.5.13.

    Broken Link Checker thinks that *all* of my links are broken. Each link has the following details:

    Log : === First try : 0 (No response) ===
    Link is broken. (Most likely the connection timed out or the domain doesn’t exist)
    HTTP code : 0

    Investigating the code in the plugin, it seems that the HTTP requests are made with cURL or Snoopy. The plugin will fail silently if neither of these are present.

    Code in link-classes.php looks like this:

    if ( function_exists(‘curl_init’) ) {
    // removed link checking code.
    } elseif ( class_exists(‘Snoopy’) ) {
    // removed link checking code.
    }
    // no code to detect situation where both curl_init and Snoopy do not exist (and alert the WordPress admin).

    This is a bug that should be fixed.

    Cheers,
    Stuart.

  13. White Shadow says:

    @ Stuart : There probably is a bug in there somewhere, but are you sure it’s that one? Snoopy is actually present in WP 2.8.4.

  14. White Shadow says:

    @ ovidiu : Hmm, the plugin seems to be detecting redirects created by Redirection (arrgh) properly when I try it on my own site. Maybe the problem is with redirects in general, not just those created by that plugin? Do any other redirects show up in the plugin’s “Redirects” list?

    Also, when the next version of the link checker is out (should be within 12 hours), go to the settings page and click on the small “Show debug info” link near the “Status” field. This will display a short report about your server configuration and WP installation; see if it mentions anything about redirects.

  15. ovidiu says:

    new version works flawless, might have been a glitch….

  16. […] als auch externe Links gewesen. Auf dem rechten Screenshot seht ihr nochmals das Ergebnis der Broken-Links-Überprüfung von […]

  17. BK says:

    Does anyone know of a version of this I can download that will work on my install of 2.6.1? I would love to use this, even if it’s a slightly out of date version. I get “network error” when installing the newest one, so there must be an incompatability (as advertised).

  18. White Shadow says:

    You can view & download old versions here. Any of the 0.4.x releases should be compatible with WP 2.6.1.

  19. BK says:

    Thank you soooo much! I didn’t really expect to get an answer, that’s so kind of you! Have a great day!

  20. Heidi says:

    Hi there I love the idea of this plugin, however it is not detecting all my broken links. There is a site that I frequently link to that uses 201 error pages (I think…the broken links all end with 201) and it is imperative to the nature of my site that I am able to find these broken links and remove the posts when they are no longer valid links. Can you provide any help?

Leave a Reply