WordPress Tweaks Bundle


Several blog tweaks bundled in one streamlined plugin for maximum performance. Enables built-in syntax coloring editor, shortcodes in sidebars etc.

Note: Because not all tweaks are applicable on every blog (and some tweaks are definitely up to personal taste), the basic plugin edition (downloadable from wordpress.org) includes only tweaks I consider the “least common denominator” – tweaks that should be acceptable/useful to most people.1

💡For more tweaks, create your own, free
customized Hackadelic WordPress Tweaks edition.

For even more tweaks, I invite you to suggest tweaks you’d like to see in the bundle.

💡 For every user-contributed tweak I select for inclusion2 in the tool,
I will add a dofollowed link to the contributor’s website.

[toc style=”margin: 1em 5em”]

What is a tweak?

A tweak, in the sense of this plugin, is a simple, self-contained adjustment to WordPress to enable a latent (often built-in but disabled) blog feature.

The code that comprises a tweak is effectively just a few lines of PHP, often a single line only.

Individual tweaks can be – and often are – provided as individual plugins.

Why bundle Tweaks?

One example of a tweak is to enable shortcodes in sidebar widgets. It is only a single line of code, but when that line of code is executed is not arbitrary. It is best done inside a plugin.

There are numerous tweaks like this example above, and they all have in common that there the mandatory plugin header comment would by far exceed their effective code size. Besides, every plugin would consume some performance to load and prepare (on every page load!), possibly more performance than it takes to perform its main function.

Hence, bundling tweaks in a single plugin makes sense.

But wait! What if I didn’t want all the tweaks in my blog?

Good point. Usually, plugin options would be employed for this, but querying and interpreting options at run-time would impede performance, too, and potentially eat up the performance saved by bundling the tweaks.

I chose a different approach. Instead of a plugin option page, I provide a free WordPress online tool to generate a customized, streamlined personal edition of the bundle – WordPress Tweak Composer.

Go ahead, give it a try.

Implemented tweaks

Shortcodes in sidebar (text) widgets

See this post about enabling shortcodes in sidebar widgets.

Shortcode escaping

If you occasionally post about shortcodes, you need a way to write the shortcode in a way that it is not executed, but just displayed. For example, say you want to describe how to add a table of contents, you write something like

Enter the shortcode [toc-right]

Without this tweak, the above text would have shown a table of content box like the one at the top of this post. With it you simply prefix the shortcode with an exclamation mark and it is not expanded, but displayed as normal text.

Break out of frames to improve your site metrics

Many sites, in particular aggregation sites like StumbleUpon or BlogTopSites, show your website inside a frame.4 There are many good reasons for them to do so:

  • The visitors never leave their site. This improves their site metrics, while it is your content that keeps visitors busy reading.
  • The boosted site metrics helps them to help sell more ads on their sites.
  • Visitors click on their ads (while effectively decreasing your ad income).

This tweak ads a simple peace of code to get rid of such frames.

Caveat: When turned on, your site will break free out of any frame. (Unless you are logged in and are viewing your site yourself, to allow testing.)

Move JavaScript to footer for faster page loading

This tweak is based on the JavaScript to Footer plugin, and incorporates one of Yahoo!'s performance best practices.»

Caveat: This may not work with some plugins (if they explicitly add JavaScript to the header that depends on code that would be moved to the footer)!

Use CodePress syntax-coloring editor in the dashboard

WordPress comes bundled with CodePress, a syntax coloring editor. However, it seems to be disabled by default.

With this tweak, the theme and plugin editor text boxes in the dashboard are morphed to syntax-highlighting code editors.

Conclusion and Forecast

The presented solution employs a generative customization approach to combine performance and convenience without compromising any of them.

Sure, currently, there are not many tweaks implemented. However, I expect them to grow over time.

More over, I invite you» to add tweak suggestions.

Cheers, and happy tweaking! 🙂

If you use this plug-in, please consider making a donation to support the further development. Donate whatever you feel appropriate. Any amount is appreciated. Thank you.

Please note: technical support will be provided to donators only.

  1. At time of this writing, (the very first release of) the basic edition activates the CodePress syntax coloring editor in the dashboard, and enables shortcodes in sidebars. []
  2. Needless to say, only useful contributions will be considered. And if I sense spam behind a suggestion, it will dramatically reduce its chanse of being included. []
  3. Hint: If you also provide the tweak code, you will increase the chance of the tweak being included. []
  4. A sort of a toolbar on the top of the page indicates such a case. []

From Best Practices for Speeding Up Your Web Site:

The problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won’t start any other downloads, even on different hostnames.

In some situations it’s not easy to move scripts to the bottom. If, for example, the script uses document.write to insert part of the page’s content, it can’t be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations.

An alternative suggestion that often comes up is to use deferred scripts. The DEFER attribute indicates that the script does not contain document.write, and is a clue to browsers that they can continue rendering. Unfortunately, Firefox doesn’t support the DEFER attribute. In Internet Explorer, the script may be deferred, but not as much as desired. If a script can be deferred, it can also be moved to the bottom of the page. That will make your web pages load faster.

Powered by Hackadelic Sliding Notes 1.6.5
Remember: For every user-contributed tweak I select for inclusion ((Needless to say, only useful contributions will be considered. And if I sense spam behind a suggestion, it will dramatically reduce its chanse of being included.)) in the tool, I will add a dofollowed link to the contributor’s website. ((Hint: If you also provide the tweak code, you will increase the chance of the tweak being included.))Powered by Hackadelic Sliding Notes 1.6.5


  • This does not work on WordPress 3.0, right?

    • Mattias, it should work on WP3.0. What exactly is the problem?

  • I think the best tweak would be to slay the dragon of browser discrepancies. For instance, it could add browser detection and provide the right width, padding and other dimensions to yield the intended design no matter if IE or Firefox is being used!!!

    I don’t know how much work is involved in making areas of a theme widget-ready, but that could be great to automate.


    • Steve, thanks for your input.

      It seems to me that your proposal goes far beyond the kind of simple tweaks this plugin is intended for. A very interesting idea it is nonetheless. If would be great if you would describe it in more detail, like how to tell what the “right” width is for any particular element on a page.

  • I use this plugin regularly without issue

I have come here to chew bubblegum and kick ass...
and I'm all out of bubblegum.
-- Nada in They Live