Query Monitor is one of those WordPress plugins that can make all the difference in optimizing every detail of your digital project. We know that to improve a website’s performance — in terms of loading speed — you need constant, continuous, comprehensive work. It’s not enough to upload lightweight images, buy high-performance hosting, and install plugins to manage caching.

These are the basic elements, the starting point. Then you need to work on the details. That’s why it’s useful to take advantage of the capabilities of Query Monitor, a WordPress extension (find it here) designed to analyze and detect errors in the various applications that make up a website, ecommerce or blog.

What is Query Monitor and what is it for?
Query Monitor is a WordPress plugin for debugging activities. This means that it allows you to analyze all aspects and components that define the structure of the portal. The goal is to detect errors that can lead to malfunctions, slowdowns and bottlenecks.

Thus, we can define this extension as a utility to improve the overall appearance of one’s website. And, as a consequence, also the speed of page execution. Once installed, it looks like a dashboard that you can reach into the backend and analyze the results.

Finally, remember that Query Monitor also offers several basic information about the website. For example you can find all the necessary data about PHP, database, WordPress version and server used.

Must-read: how to use Google’s Pagespeed Insight tool.

How Query Monitor works
Let’s simplify the technical explanation as much as possible. Website applications make queries to the database. The plugin in question oversees the progress of this flow and organizes it. It indicates any errors to be corrected but also execution times of the various elements.

The plugin we are analyzing oversees debugging of database queries, but also PHP errors, problems related to scripts and CSS stylesheets, incompatibilities with other plugins and templates, calls of the HTTP API and Ajax for the advanced version. But there are other possibilities as well.

One of the most interesting aspects of this plugin so beloved by WordPress developers and web performers? The organization of results. You have your dashboard organized in tables that makes it easy to read the data. So you can immediately identify what’s working and what needs maintenance.

After installing the plugin you can already notice the presence of a new element in the dashboard. I’m talking about a minus entirely dedicated to the optimization performed by Query Monitor where you identify a number of metrics that are useful for evaluating performance. For example, you have numbers that indicate:

  • Seconds required to generate the web page.
  • Kilobytes of maximum memory usage.
  • Seconds used by SQL queries.
  • Total number of SQL queries.


This is the starting point. Then, if you want to analyze the individual web page to get answers in specific terms you have to click on the various entries. But if there are any emergencies the plugin brings them up. So you can decide how to take action to correct or eliminate the problematic component.

How to use Query Monitor for a slow site
Sure, this WordPress plugin is essential for fully debugging a website, but it’s clear that one of the main reasons you install this add-on is to be able to correct the elements that slow down the pages of your project. How? There are a few key elements to point out.

Query By Elements
The Query By Component section shows information about the calls made by all plugins and the theme to the database while the page is loading. Specifically, what is this step used for? Simple: you can identify the elements that result in poor performance.

The control panel for queries is sorted by the total time taken by queries related to each component. So if an extension results in a large number of queries, and is particularly slow in execution, you can make a decision: remove, replace, or perhaps optimize.

PHP Errors
The panel dedicated to the well-known PHP Errors only shows up with red or orange alerts (warning or notice) if there are problems in this regard. This type of event identifies a possible malfunction on the website but also a node that can cause it to slow down.

Template
You can imagine how important it is to have a debugging tool to evaluate template efficiency. With Query Monitor you can get valuable information on this element as well, especially to discover any problems loading sections.

Query Monitor analyzes the condition: it shows file name and row number where the failed call was made. So you can take the best action to make your WordPress theme work at its best. Both from a performance point of view and to correct graphical errors.

Scripts and styles
The heart of the plugin aimed at programmers and those who want to optimize their website to make it fast and snappy. If the portal in question loads a lot of JavaScript or CSS files you may notice an increase in page load time. This can be a problem: how to fix it? You have a plugin like WP Rocket that help this sense but for more in-depth work you need to analyze the detail.

The Scripts and Styles sections you find on the Query Monitor navigation menu illustrate this condition so you can decide how to move forward: whether or not to install a plugin to compress and combine these elements and whether the one you already have installed is doing a good job.