CheckPlaces is a Firefox extension that allows you to check your bookmarks in different ways. There is a basic check of your bookmarks, and optional checks that the pages still exist, duplicate bookmarks, and empty folders. You can also use it to restore favicons that have gone missing.
This is one of a number of extensions I've written that you may find useful.
February 3rd 2010 - CheckPlaces v2.0.1 released: Progress count didn't include Livemarks. French locale issue corrected, updated other locales.
January 12th 2010 - CheckPlaces v2.0.0 released: Main changes:
December 25th 2009 - CheckPlaces v1.6.6 released: Restores more favicons. Timeout function now more reliable.
November 30th 2009 - CheckPlaces v1.6.4 released: Catch more types of bad folder
To begin select the CheckPlaces option in the status bar, toolbar, Tools menu, or the Bookmarks menu:
This will display the options dialog:

The 'Check for duplicates' option will look for bookmarks that have the exact same URL.
The 'Check for empty folders' option will look for folders that do not contain anything except separators (i.e. bookmarks, queries, or other folders). This may be useful after you've deleted any bad/duplicate/broken bookmarks from an earlier CheckPlaces run. Because you may have some folders that include other empty folders, you may have to run CheckPlaces more than once to get them all.
The 'Check pages exist' option will check each unique bookmark by trying to visit it. This helps to remove any old pages that no longer exist. Note that some web sites may take a very long time to respond (especially if you are going through a proxy/firewall), so you may wish to use the 'Use timeout' option to cancel these checks after a certain time. But note that low timeouts may cause a lot of false positives. Also the timeout figure applies to every page checked so increasing the Concurrency or turning it off will prevent a few stuck pages holding up the rest of the checks. And because CheckPlaces tries with a HEAD before timing out and then with a GET before timing out it will take twice as long as the timeout is set to for each page.
CheckPlaces will try to check all of your bookmarks at the same time. This may swamp some network devices causing them to fail, so you may wish to set the 'Concurrency' option to specify how many bookmarks you wish to check simultaneously.
Favicons can often be lost, especially when importing/synchronising bookmarks with other browsers. Most of them can be restored using the 'Load favicons' option, which will search for and load favicons for bookmarks that don't have them.
When checking links a HTTP HEAD request is issued which only downloads the web page headers saving bandwidth and speeding up the check. If this is not successful then a GET request is issued. But some servers will hang when receiving a HEAD, so if you have a lot of bookmarks that appear to hang you may wish to 'Check using GET' which will skip the initial HEAD request.

The 'Show excluded items' button allows you to view and if required include any pages/folders you may have excluded in previous checks (see later).
By default all of your bookmarks are checked, but you may wish to only check a subset. Select the 'include' option and a dialog will appear allowing you to choose which folders to include in your check. Select the 'exclude' option to choose which folders to ignore:

Select one or more folders to 'include' or 'exclude' from the check. Note that the 'Tags' folder and it's content will be ignored if you select them. (Unfortunately, Firefox doesn't provide a simple way of excluding the Tags folder from the display).

The display option tab allows you to choose exactly where you wish CheckPlaces to appear within Firefox. Note that you must select at least one item because you cannot start a check from the Add-ons dialog. CheckPlaces may also be added to your toolbar in the usual way.
Click the 'Check Bookmarks' button to start the process, and a progress window will appear:

Depending on how many bookmarks you are checking there may be a long pause before the 'Cancel' button becomes active, but once it does you can cancel the check at any time.
Note: It is quite common and perfectly normal that it may appear to hang when trying to access certain web servers. Because CheckPlaces checks all your bookmarks in parallel, these 'hanging' ones will always be the last to finish even though they may have been the first checked. Just click the cancel button and it will list those cancelled bookmarks so you can try them manually. Setting a timeout may prevent it hanging for too long, and using 'Check using GET' may prevent the problem altogether, although the check may run slower. Also if the bookmarks really are okay then you can always excluded them from future checks.
Once the check is completed a results window will appear:

At the top is a summary of the check showing how many bookmarks were checked, how many pages were tested, how many livemarks were tested, how many bookmark folders were searched, and how many individual pages/folders were excluded. Don't be surprised if these numbers are slightly different to what you were expecting (for example, if you have three duplicates only one is tested and so the other two are not included in pages count). Below this are counts of the items in each tab.
If there are any possible issues to report different tabs will appear below this containing lists of bookmarks or folders with possible issues. Selecting one of these will display a status message and some details about the bookmark. Note: You can resize the results window to view these better.
When checking pages the 'Status/Count' will normally contain the status code and message received from the web server e.g. "404: Not found", or other explanatory message. For duplicates the it shows the count of how many duplicates were found. If you have any 'Bad' bookmarks then the 'Status/Count' will display a Firefox exception - there may also be further information in the Error Console.
If an 'Open' button appears then you can use this to open one or more bookmarks in Firefox tabs to manually check them. You can also change the name and location (URL) of each bookmark if you wish, which may be useful if the page you've bookmarked has just been moved elsewhere.
You can select one or more items from each list to delete or delete the whole list (see below for information on deleting duplicates). Items are not deleted immediately but are added to the deleted tab, so you can review any deletes before making them permanent.
You can also exclude one or more items from future checks using the 'Exclude' and 'Exclude all' buttons. These items will not be checked in future and will appear in a separate list of excluded items, where you can choose to include them again. You can also review which items are included before a check using the 'Show excluded items' button on the options dialog (see above).

The Duplicates tab lists every bookmark with the same URL, i.e. the 'original' and any copies of this. When you select an URL from the top list each bookmark which uses this URL will appear in the list below.
As with other results, you can choose to open the URL, exclude all the bookmarks, or delete or exclude individual bookmarks. But to be safe you can't delete all of the bookmarks listed for each URL as you will normally wish to keep one of your duplicates.
A common requirement is to delete all of the newer duplicates for every URL listed, keeping just the earliest bookmark for each URL. In this case use the 'Delete all duplicates' button. (If you have any duplicates with the same timestamp then one of these will be randomly selected to remain.) Of course you can always review and reverse any deletes using the Deletes tab before they are really deleted.