---
title: New Plugin: Widget Output Cache
date: 2013-03-11T22:15:02+00:00
modified: 2013-03-11T22:15:02+00:00
image:: https://kaspars.net/wp-content/uploads/2013/03/screenshot-server-response-time-wordpress.png
permalink: https://kaspars.net/blog/plugin-widget-output-cache
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
post_tag:
  - Plugin
category:
  - WordPress
---

# New Plugin: Widget Output Cache

[![Screenshot of server response times, WordPress](https://kaspars.net/wp-content/uploads/2013/03/screenshot-server-response-time-wordpress.png?strip=all&quality=90&resize=500,133)](https://github.com/kasparsd/widget-output-cache)

Like it or not but many WordPress widgets, plugins and themes are poorly coded and do crazy things like remote HTTP requests and multiple database queries on every page load which drastically decreases the performance of your website.

One solution is to simply fix the plugin or theme and send a patch to the original author in hopes of it actually being included in the next release of the plugin or theme. **A more generic solution is to use the crude PHP output buffering together with WordPress transients to store and retrieve complete widget output from database or non-persistant object cache.**

While this is certainly not the most elegant solution, it definitely is the quickest to implement thanks to the `widget_display_callback` filter.

**[Widget Output Cache](https://github.com/kasparsd/widget-output-cache)** is a plugin that does exactly that.