Great Ocean Media
website design - editorial & pr services - freelance journalism

adi_detritus – Sweep up the rubbish

After years of development, multiple enhancements, a succession of Textpattern upgrades, endless fiddling … website installations can get a bit untidy. This is where adi_detritus comes in. It’ll scour your website’s filesystem and plugins for items that are redundant, superfluous or even absent.

However, no changes are made. It’s up to the website administrator to decide what to do with the information presented.


After installing & activating the plugin you’ll see a new item under Admin.

The Detritus tab lists a number of warnings related to the website’s filesystem, plugins and preferences.


In some cases they may be significant, for example a missing .htaccess file.

In other cases, you may view them as inconsequential but untidy, e.g. an old README or licence file left behind from a previous TXP version.

You may even consider them irrelevant, e.g. an empty directory.

There will undoubtedly be some false positives, so be prepared to use a pinch of salt. You’re the boss!

Fine tune the results

You can educate adi_detritus by setting some preferences.


Where adi_detritus does its rummaging

Note that subdirectories are not traversed any deeper than the immediate level.

It’s good to moan

Examples of pedantry are:

Is there anything that won’t be complained about?

Manifestation mishmash

As of TXP 4.8, plugins are stored in the filesystem as well as the database. This means there is potential for mismatches. adi_detritus flags plugins:

Missing manifest files will be listed. The lack of a manifest file is not an issue for plugin or website operation.

CSS – unusual or misunderstood?

PHP is not infallible when determining file types. From testing, CSS files can appear to be ‘text/plain’ (fair enough) or ‘text/x-asm’ (do what?). There is a ‘text/css’ type, but I haven’t seen one yet! However, anything else is deemed “unusual” – whether that’s a big deal anyway, I’m not sure.

Questioning the queries

What’s your preference?

The plugin will look at preferences stored in the database and attempt to flag those which are possibly redundant – perhaps due to deleted plugins not tidying up after themselves.

This process relies on plugins storing their preferences associated with recognisable events. These events are taken from the callback list created by TXP Admin which is populated when plugin authors use register_callback('plugin_function', 'plugin_event'). Some plugins, especially those without their own tabs, may be listed erroneously.

Note that preferences belonging to inactive plugins will also be flagged.

It should be fairly obvious which plugins relate to the redundant preferences listed. If you’re sure you want to delete preferences, then you’ll need to manipulate the database directly – using for example: smd_prefalizer, MySQL CLI, phpMyAdmin, or Sequel Pro.



You can adjust who gets to use the plugin by setting the privileges in options. Default = Publisher only.


To install the Textpack, go to the plugin’s Options tab and click Install textpack. This will copy & install it from a remote server. The number of language strings installed for your language will be displayed.

If the Textpack installation fails (possibly due to an error accessing the remote site), the alternative is to click the Textpack also available online link. This will take you to a website where the Textpack can be manually copied & pasted into the TXP Admin – Language tab.

Additions and corrections to the Textpack are welcome – please use the Textpack feedback form.

Additional information

Support and further information can be obtained from the Textpattern support forum. A copy of this help is also available online. More adi_plugins can be found here.

adi_detritusv0.7Download (Uncompressed) Textpack SupportTXP 4.7+