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. Matt says:

    Hiya,

    Thank you for this new version : v0.5 is a great improvement over previous versions in terms of speed and usability.

    Cheers !

  2. xdaniel says:

    Hi, got on error on adminscreen after updating:

    “Table ‘dbxxx.ifolk_blc_instances’ doesn’t exist”

    Any idea?

    Best wishes and thanks a lot for the great plugin!

  3. White Shadow says:

    That’s a bug. I’ve uploaded a fixed version, 0.5.1.

  4. xdaniel says:

    worked πŸ™‚ thx

  5. Kelson says:

    I haven’t been able to get the new version to detect any links at all. Even if I tell it to recheck all pages, after a few seconds it switches from “Searching…” to “No links detected.”

    Every post and blogroll entry shows up in (prefix)blc_synch, but the synched and last_synch columns are all 0 and 0000-00-00 00:00:00. The other two blc tables are empty.

    I don’t see anything relevant in the JavaScript error console or the PHP error logs on the server.

    This is with 0.5.1 on WP 2.7.1. Just to be sure, I tried disabling all my plugins except this one, and it still didn’t find any links in ~500 posts — most of which do have links in them. The previous version (0.4?) had been working for months, and most recently had found 4 broken links that I hadn’t decided how to handle.

  6. White Shadow says:

    Hmm, I can’t really imagine any possible execution path that could lead to this behaviour, unless… Yep, I’ve still got the table prefix hard-coded as “wp_” in one query.

    I’ve just uploaded version 0.5.2 that should fix the problem.

  7. Kelson says:

    Thanks, that did it! It’s in the process of checking 3200 URLs (yeah, I link to a lot of stuff)

  8. Gary says:

    Did any of the reports you recieved about previous versions mention about it causing phpfcgi / phpcgi to slowdown and in some cases crash? (possibly thos race conditions you mentioned).

    If so, I’ve /literally/ just sent a request to me host to swap my site to a newer server because my site was performing soooo badly when logged in to WP! Oh well.

    Just about to upgrade the plugin on another site of mine, so thank you for this useful broken link checker πŸ™‚ The improvements for 0.5 are very positive indeed.

  9. White Shadow says:

    I got reports about slowdowns, but I never could think of anything that could be causing them (until recently that is). I’m still not sure if this version fixes that – I could never reproduce the problem. And this server did in fact run PHP in CGI mode until recently as well.

  10. Gary says:

    I am finding that BLC is now causing Firefox to crash instantly πŸ™ It’s never crashed in this way before. It first happened when I activated the BLC plugin (although I activated a couple of others at the same time, so couldn’t narrow it down), though the plugins were activiated. Then it later crashed a couple of more times.
    Finally, to confirm the problem is in BLC, it’s just crashed as I clicked to Unlink a broken link – the link did get unlinked, so it’s something after the query that Firefox doesn’t like.
    Any clues, or can I provide you with more info?

  11. White Shadow says:

    What version of Firefox do you have? I tested the plugin extensively in FF 3.0.10 and didn’t encounter any problems.

    I suspect a Firefox addon might be causing this. Any candidates?

  12. Gary says:

    FF 3.0.10 here as well.

    As I said, I’ve not seen this type of crash before, but it is definitely related to BLC, even it’s a plugin it’s not liking, rather than FF itself.

    My list of enabled addons:
    Adblock Filterset.G Updater 0.3.1.3
    Adblock Plus 1.0.2
    Adobe DLM 1.5.2.29
    Ancestry.com Advanced Image Viewer 1.0.0.1
    British English Dictionary 1.19
    ColorZilla 2.0.2
    Console^2 0.3.10
    Download Statusbar 0.9.6.5
    Fire.fm 1.2.3
    Firebug 1.3.3
    Firecookie 0.8
    FireRainbow 0.8
    Google Gears 0.5.19.0
    Sage 1.4.2
    ShowIP 0.8.17
    Web Developer 1.1.6
    YSlow 2.0.0b3

    The crash is intermittent – I tried Unlinking a non-broken link, and it worked fine. As such, disabling any/all plugins, or trying it in IE won’t be conclusive, unless it just happens at the right time.

  13. White Shadow says:

    Hmm, now that I think of it, it could be the plugin’s fault. The “Unlink” button fires off an AJAX requests and expects a JSON-encoded response. If there’s a bug in the PHP code somewhere, the response might be invalid JSON and cause a … JS exception? But still, that shouldn’t cause the entire browser to crash.

    You could use a HTTP sniffer to see what data your browser receives (as a result of clicking “Unlink”) just before crashing.

  14. Gary says:

    I disabled and uninstalled some plugins, created a new post with a broken link, then Unlinked it from BLC, and it worked fine. All the HTTP stuff came back as 200 (although the Post was “action blc_work” according to Firebug, but sent to “?action=blc_unlink” according to Live HTTP Headers. In the former case, the Response content seemed to be empty?).

    I’ll stop tinkering and see if it happens anymore. Thanks for your plugin and assistance πŸ™‚ For one of the sites I was working on, it was absolutely invaluable.

    http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/ needs the version numbers etc updating.

  15. White Shadow says:

    The plugin does periodic blc_work requests to run the actual link checking routine. These should have an empty response.

    The unlink-button AJAX is separate. It sends action = blc_unlink, link_id = [id] (via POST) and should receive back a JSON-encoded response.

    And I know the page needs updating, I’m just lazy πŸ˜›

  16. Dixi says:

    I tried the plugin against WP2.6.5. After pressing “Recheck All Pages” it shows “Network Error” message despite I haven’t noticed any network errors.

    In the “Broken links” tab it shows only one link (which is valid).

    How can it be resolved?

    Thanks

  17. White Shadow says:

    This version is only compatible with WP 2.7 and up. You need an older version of the plugin if you want to use it with WP 2.6.5.

  18. Linda says:

    I’ve had to de-activate the plug-in as it detected every image link to flickr on my edu blog as being broken. All my post use flickr images, it’s kind of the point of the blog! It seems to detect the image source as being the blog domain url and then adds the flickr url on to that. (e.g. http://mydomain.com/www.flickr.com/photos/nameofperson/i234f67/) I’ve double checked the html of several posts and there’s nothing funny going on there. I also tried deleting the ‘broken link url’ via the plugin but they just reappeared. Eventually I added the word ‘mydomain’ to the exclusion list in settings – it then couldn’t detect any links at all.

  19. White Shadow says:

    Check if the image URLs (in the posts, not in the plugin’s list) include the protocol part, i.e. “http://”. The plugin can get confused if they don’t.

  20. Linda says:

    Thanks for the quick reply. That was the problem. something to do with the flickr blog this template. Sorted now and the plug-in is working fine. Thanks again.

Leave a Reply