Dev & Security

Query Monitor: 7 Essential Checks for a Safe Investigation

Query Monitor: Find Slow Plugins and Queries in WordPress

Your site feels slow, but caching plugins and image optimisation haven’t helped. Possible causes include database work, slow external requests, expensive application code, and infrastructure limits. Query Monitor is a free developer tool that provides diagnostic information about the WordPress request you are inspecting.

This guide explains what Query Monitor does, how to install and open it, how to find slow queries, how to spot plugin and theme problems, and what to do with the results.

What Query Monitor does

Query Monitor adds a panel to your admin bar with detailed information about the page you’re viewing:

  • Database queries: how many ran, how long they took, and which plugin triggered them.
  • PHP errors, warnings, and deprecated notices.
  • Hooks and actions that fired, and what’s attached to them.
  • HTTP API calls to external services, which often cause slow admin pages.
  • Template files used to build the page.
  • Memory usage and total page generation time.

Query Monitor overview — Query Monitor: 7 Essential Checks for a Safe Investigation

Installing and opening the panel

  1. Install Query Monitor from Plugins → Add New and activate it.
  2. Browse your site or admin while logged in as an administrator.
  3. Look at the admin bar: you’ll see page generation time, memory, and query count.
  4. Click it to open the panel, then use the menu on the left to explore each section.

Output is permission-controlled; review the current access configuration and do not share sensitive diagnostic details publicly. Even so, run it on staging where possible, or enable it briefly on live and deactivate it afterward.

Finding slow queries

  1. Open the Queries panel and sort by time.
  2. Prioritize expensive or unexpectedly repeated work relative to the page’s purpose and total generation time; no single query count establishes a fault.
  3. Use Queries by Component to see which plugin or theme is responsible.
  4. Check Duplicate Queries — repeated identical queries are a lead to investigate, not automatic proof that a general caching plugin will fix the cause.

Repeated queries may reflect loops, repeated calls, or caching opportunities. Review the responsible code and data freshness requirements before choosing a cache strategy. See Best WordPress Caching Plugins Compared.

Spotting plugin and theme issues

  • One plugin dominating query time is your prime suspect: look for a lighter alternative or ask its support team.
  • Slow HTTP API calls (licence checks, remote feeds) can make the dashboard crawl. Caching or disabling that feature often helps.
  • PHP warnings and deprecated notices point to outdated code — helpful before a PHP upgrade, as in How to Upgrade PHP Version Without Breaking WordPress.
  • Heavy admin-ajax activity on every page load is another common slowdown.

Acting on what you find

  1. Confirm the cause: deactivate the suspect plugin on staging and compare query counts.
  2. Replace or remove plugins that are heavy for the value they provide — see How to Reduce Plugin Bloat in WordPress.
  3. Add caching so expensive queries run less often.
  4. Investigate database structure and workload before deleting records — see How to Clean Up a Slow WordPress Database.
  5. Re-test and record the before/after numbers.

Hosting for developers

Query Monitor shows you where time is spent, and good hosting lets you act on what Query Monitor finds. Developer workflows need SSH, Git, WP-CLI, and room to run tools. A Kawedma VPS server or cloud hosting gives full control, as do an unmanaged VPS or managed VPS from Hosting.com. For client sites with staging built in, managed WordPress hosting powered by Rocket.net and Kawedma WordPress hosting are good choices, and agencies can use Kawedma reseller hosting.

Key takeaways

  • Query Monitor shows slow queries per page and names the component.
  • It also reveals PHP errors, hooks, and slow external calls.
  • Use it on staging, or briefly on live, then deactivate.
  • Confirm findings by testing with the suspect plugin disabled.

Query Monitor: 7 essential checks for a safe investigation

Query Monitor is most useful when you start with a concrete symptom and keep comparisons controlled. A high query count is not a diagnosis, and the first component in a table is not automatically something to remove. Establish what the page needs to do, which stage is slow, and what evidence would support a particular change.

Use a staging copy for experiments that disable plugins or modify code. Keep production observation brief and proportionate when it is needed to reproduce an environment-specific issue. Diagnostic tooling itself consumes resources, so use separate measurements after the investigation to confirm the real user experience.

1. Define the request you are investigating

Record the URL, request method, account role, action, and cache state. Query Monitor describes the request being observed, so an administrator’s uncached dashboard visit is not equivalent to an anonymous visitor receiving a cached article. Keep those experiences separate in your notes and identify which one has the reported problem.

Write a simple expected result. For example, the product editor should open without an unusually long wait, or a search should return the correct matching products. Include the approximate time and recent changes. A clear reproduction makes it easier to distinguish a persistent bottleneck from an isolated delay.

2. Capture a repeatable baseline

Repeat the same action under similar conditions and record the range of results. Query Monitor can help identify variation in database time, memory, and external calls, but a single load may include cache warming or a one-off remote delay. Do not build a performance claim from the fastest or slowest sample alone.

Keep the versions, content, user role, and test environment stable while comparing. If you change the theme, cache configuration, and several plugins together, you may improve the page without knowing which change mattered. That makes future maintenance harder and can conceal a functional regression behind a better timing number.

3. Separate database work from total generation time

Compare total generation time with database time and the rest of the evidence. A page can be slow even when its queries are quick. Query Monitor may reveal an external request or other work that deserves attention. Optimizing a minor database cost will not solve a much larger delay elsewhere in the request.

Use the official usage guide to interpret the overview. Its metrics concern the observed server-side request; they are not a complete browser rendering audit. Images, scripts, network conditions, and layout behavior still require appropriate browser and page-performance measurements.

4. Investigate expensive queries in context

Look at the SQL, caller, component, returned rows, and measured duration. Query Monitor groups database activity in ways that help narrow the investigation. Ask why the page needs that work and whether the same result is requested repeatedly. A count without duration or purpose can lead you toward the wrong optimization.

A query that retrieves a large useful result and a query that repeats needlessly fifty times require different solutions. Read the database panels documentation and preserve a sanitized example for the responsible developer. Avoid running write queries or deleting data merely because a table name looks large.

5. Check server-side external calls

Inspect the HTTP API panel when a request waits on a remote service. Record the destination, response, time, and caller without exposing credentials or private query parameters. Query Monitor can show calls made through supported instrumentation, but absence from a panel is not proof that no network activity occurred anywhere in the application.

Check whether the integration needs to run during that user request. A supported cache, a background refresh, or corrected timeout handling may be appropriate, depending on the requirement. Do not disable licensing, security, payment, or synchronization behavior without understanding its purpose and the effect on the business workflow.

6. Test a specific hypothesis on staging

State the hypothesis before changing anything: for example, a particular feature makes a remote request on every editor load. Use Query Monitor to record the starting behavior, change that feature through a supported method, and repeat the same test. Keep functional acceptance checks alongside performance measurements.

If disabling a plugin improves timing, confirm what functionality disappeared with it. Removing a required form, calculation, or checkout step is not an acceptable optimization. Investigate a supported configuration or code correction, and involve the maintainer when the behavior belongs to a third-party component.

7. Validate the correction and remove temporary tooling

Repeat the original user task after the correction and inspect relevant errors. Query Monitor should show whether the suspected work changed, while an independent user-facing test confirms whether the experience improved. Check representative pages beyond the one optimized request to catch side effects.

Record the final configuration, evidence, remaining uncertainty, and owner. Disable temporary diagnostic tools when the session ends unless there is an explicit maintained reason to retain them. Keep sanitized notes rather than an uncontrolled collection of screenshots containing private paths, SQL values, or remote service details.

Query Monitor checklist — Query Monitor: 7 Essential Checks for a Safe Investigation

Reading Query Monitor without jumping to conclusions

Observation Useful next question Unsupported conclusion to avoid
Many queries Which ones consume time or repeat unnecessarily? Every high count means a defective plugin
One slow SQL operation Is the duration repeatable and what workload produces it? A generic cache will always solve it
Long remote request What service, caller, and response are involved? The database must be the bottleneck
PHP warning What workflow and input trigger it? It is harmless because the page still renders
Fast administrator request Does the actual visitor journey also perform well? The entire site is now fast

Query Monitor is an evidence source, not a replacement for understanding the feature. Prioritize work by user impact and a reproducible cost. A minor warning may still matter for correctness, while a large but necessary operation may need batching or a separate workflow rather than removal.

A practical slow-dashboard investigation

Consider a fictional site where opening an editor intermittently takes several seconds. Start by recording the affected action, time window, active versions, and whether another administrator can reproduce it. Load the same screen several times with Query Monitor active in a suitable test environment and compare the observations.

Suppose database time stays modest while a remote request accounts for much of the delay on slow samples. That supports investigating the integration rather than deleting revisions. Check its supported refresh settings, credentials, and response handling. Preserve a sanitized trace and ask the vendor whether the request belongs in that interactive path.

After a supported correction, repeat the same screen and confirm that its original functionality still works. Measure again without diagnostic overhead where practical. Describe the result as a change observed under those conditions; do not turn one dashboard test into a universal claim about every page or every installation.

Duplicate queries and caching choices

Duplicate SQL text can reveal repeated work, but decide what can safely be reused. Query Monitor helps identify callers and repetition within the observed request. A developer should check whether the same inputs and permissions produce the same result before adding caching or changing how the query is issued.

Distinguish full-page caching from object caching and from application-specific result caching. A page cache may not serve authenticated administrative screens at all. A persistent object cache only helps code paths that actually use the relevant cache mechanism. Installing a cache product does not automatically rewrite inefficient custom SQL.

Plan invalidation and freshness requirements. A cached count may be acceptable for an informational summary while stale order state can be unacceptable in an operational screen. Test data changes as well as repeat reads, and verify that one user’s cached result cannot expose information to another user.

Errors, hooks, and template context

Use the error information to locate a reproducible symptom and inspect the surrounding call path. Query Monitor can attribute messages to components, but a reported file is not always the original source of bad input. A plugin may receive unexpected data from a theme customization or another integration.

Template and request information can help when the wrong layout or query is being used. Confirm the resolved context before editing theme files. A visual issue might arise from selecting an unexpected template rather than a slow query. Keep correctness and performance questions distinct so the investigation has a clear target.

Hook listings describe relationships in the application, but simply seeing many callbacks does not establish a bottleneck. Use timings or a controlled experiment to identify expensive work. Removing callbacks without understanding their responsibilities can break important behavior even if the page generation number becomes smaller.

Request boundaries matter

A normal page load can trigger later browser requests that have their own execution and errors. Query Monitor’s information for the initial page does not automatically describe every later Ajax or REST request. Identify the specific failing request and use the supported diagnostic method for that request type.

The project documents REST request diagnostics for appropriately authenticated users. Follow that guidance within an authorized development workflow. Keep authentication material private and avoid sharing full request addresses when they contain nonces, tokens, customer identifiers, or other sensitive context.

For front-end JavaScript errors, use the browser console and network tools alongside server diagnostics. A server response can be quick while the browser struggles with a large script or layout. Conversely, a browser error may reflect an unexpected server response. Connect the two observations through the actual request and response.

Comparing results fairly

Keep a small worksheet with URL, role, environment, cache state, versions, action, sample times, database cost, notable external requests, errors, and acceptance outcome. Query Monitor observations become more useful when another person can repeat the comparison and understand what changed between the samples.

Do not publish synthetic numbers as if they were measured. If you have not run a benchmark, describe the intended test and the kinds of evidence to collect. Avoid arbitrary universal limits for memory, query count, or generation time; the acceptable behavior depends on the workload, host, and user requirement.

When results vary widely, investigate the variation before claiming a win. Background work, shared-host contention, remote dependencies, and cache warming can influence observations. Repeat the relevant tests and report a meaningful range with conditions rather than selecting the most favorable number.

Query Monitor next steps — Query Monitor: 7 Essential Checks for a Safe Investigation

Preparing a useful support handover

Send the maintainer a concise description of the issue, reproduction steps, versions, recent changes, and a sanitized excerpt. Explain the expected behavior and what your controlled comparison showed. Query Monitor screenshots can help, but include readable text for the important message so the recipient can search and discuss it accurately.

For hosting-related issues, include the exact time window and the installation involved. Ask about relevant resource or database evidence rather than demanding a plan upgrade without a diagnosis. More capacity may help a legitimate workload, but it can also leave an avoidable application problem unresolved.

If you need implementation support, KAWEDMA offers hosting and website development services. Provide the symptom, current evidence, and acceptance checks so the work can be scoped. Ask for a handover explaining the correction and the limits of the observed improvement.

Questions about Query Monitor

Does it speed up the site automatically?

No. It is a diagnostic tool. The improvement comes from a justified change to code, configuration, data access, hosting, or another identified cause. Keep the tool’s observations separate from the correction itself and verify the result through the original user journey.

Is the component with the most queries always bad?

No. It may provide a major feature that legitimately needs data. Assess duration, repetition, expected workload, and alternatives. Query Monitor can help prioritize investigation, but choosing what to remove requires understanding the value and dependencies of the feature.

Can I use one page as a site-wide benchmark?

No. Test representative templates and important actions, including authenticated and anonymous experiences where relevant. A product search, checkout, article, and administrative screen may use very different code paths. State exactly which path and conditions your observations cover.

What should I do when the investigation ends?

Verify the fix, remove temporary instrumentation, protect or delete diagnostic records according to policy, and record the outcome. Keep a short reproducible test for future maintenance. Query Monitor should support a clear decision and a maintainable correction rather than become a permanent source of unreviewed warnings.

Z
zasma171

Writes for Hostreta about the topics covered in this article.

Comments (0)

Your email address will not be published. Required fields are marked *

Ad
Affiliate links
Tools we recommend
Protect Your Website with Automated Daily Backups
$2.09
Get it
the easiest way to manage all of your social media accounts
$29
Get it
Starter Website Get online, properly
$249
Get it
google workspace Business Starter
$3.75
Get it
Nord Vpn Cybersecurity. Built for Everyday Use
$8.99
Get it
More hosting options · affiliate
AI SiteBuilder
View plans
AI Application Hosting
View plans
Shared Hosting
View plans
Reseller Hosting
View plans
Managed WordPress · Rocket.net
View plans
Unmanaged VPS Hosting
View plans
Managed VPS Hosting
View plans
Virtual Dedicated Servers
View plans

We may earn a commission on purchases made through these links, at no extra cost to you.

Ad
Ad

$ top hosting picks

affiliate
★★★★★

KAWEDMA Website Services

See optionsCheck current plans and terms
  • Explore website setup services
  • Choose a scope that fits your project
  • Confirm features with KAWEDMA
Explore KAWEDMA →
affiliate link · we may earn a commission
★★★★★

Managed WordPress Hosting

See plansCurrent terms on provider website
  • Managed hosting for WordPress
  • Powered by Rocket.net
  • Compare current plan specifications
View WordPress plans →
affiliate link · we may earn a commission
★★★★★

AI SiteBuilder

See plansCheck current offer and renewal terms
  • Explore AI-assisted website creation
  • Review included tools and features
  • Choose a plan for your project
Explore SiteBuilder →
affiliate link · we may earn a commission

Never miss a new article

Join thousands of developers and builders getting a weekly digest of the best tech articles.