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.
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.
Shortcodes in sidebar (text) widgets
See this post about enabling shortcodes in sidebar widgets.
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
- 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.)
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.
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.
Powered by Hackadelic Sliding Notes 1.6.5
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.
- 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. [↩]
- 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. [↩] [↩]
- Hint: If you also provide the tweak code, you will increase the chance of the tweak being included. [↩] [↩]
- A sort of a toolbar on the top of the page indicates such a case. [↩]