digitalDot Diagnostics Export for Query Monitor

Description

digitalDot Diagnostics Export for Query Monitor extends the free Query Monitor plugin. It helps developers compare multiple requests, identify repeated SQL queries, inspect HTTP call latency and analyse the cost of selected WordPress hooks.

The following diagnostic files can be collected while an administrator deliberately enables capture:

  • Request timing, database timing, HTTP duration, memory and approximate PHP time.
  • SQL query structure, timing, caller information and duplicate detection.
  • PHP warnings, notices and available stack information.
  • Outgoing HTTP request URLs, response codes and latency.
  • Script and stylesheet inventories, render-blocking hints and local file sizes.
  • Hook/action timings and limited per-callback attribution when safe probes can isolate a callback.
  • PHP, WordPress, database, object cache and OPcache configuration metrics.
  • Optimised and full RAW (non-summarised) ZIP exports, generated locally.

The optimised archive uses local deduplication and aggregation before download. There is no requirement for an AI provider account and no AI API is contacted by this plugin. Users may choose to upload the ZIP themselves to a third-party service.

Privacy and diagnostic data

Capture is off by default. Only requests made by the administrator who explicitly enabled capture are logged. Collection is not enabled for other administrators or anonymous visitors. Callback instrumentation also stays disabled unless capture is active for that request.

The plugin keeps data in a randomly named, private directory outside the document root (typically under PHP’s temporary-files directory) rather than inside the plugin folder or public uploads. Files are only downloaded through an administrator-only, nonce-protected endpoint. Hosts may automatically clean their temporary directories, so export important records before host maintenance.

Captured diagnostics can contain sensitive information, including server paths, SQL query structure, product/order identifiers, request paths and performance metadata. The plugin removes SQL quoted literal values and common secret-bearing URL query parameters before writing logs. This is best-effort protection, not a guarantee of anonymisation. Always inspect exported files before sharing them.

The plugin does not transmit telemetry to digitalDot or to any AI service. Data is written locally only when an administrator opts in. Downloading an archive is a user-initiated action. Users are responsible for their own policies and legal obligations when sharing technical diagnostics with external services.

Logging stops when capture is disabled; existing files remain until you purge them or uninstall the plugin. Uninstall removes the plugin’s settings and known log files. The underlying temporary directory may also be cleared by the host at any time.

Storage configuration

When PHP’s temporary storage is unsuitable, create an existing, writable folder outside the web root, and set the following in wp-config.php:

define( 'QMDD_PRIVATE_STORAGE_DIR', '/private/server/path' );

The plugin will refuse to write diagnostic logs if it cannot find a writable non-public directory. It will display a warning on its own Tools screen instead of falling back to a web-accessible path. Files are protected in depth with restrictive directory permissions and web server denial files; these are not a replacement for storage outside the web root.

Dependencies

Requires Query Monitor, distributed separately from WordPress.org. WordPress 6.5+ supports dependency installation via the Requires Plugins header. This plugin is an independent extension made by digitalDot, and is not affiliated with or endorsed by the Query Monitor maintainers.

Installation

  1. Install and activate Query Monitor.
  2. Install and activate digitalDot Diagnostics Export for Query Monitor.
  3. Open Tools > digitalDot Diagnostics Export in the WordPress admin dashboard.
  4. Enable debug capture, optionally include wp-admin requests, and save the settings.
  5. Browse the site while signed in as the administrator who enabled capture.
  6. Return to Tools to export an optimised or RAW ZIP, then purge the logs and disable capture.

FAQ

Does the plugin send my database queries to an AI service?

No. All processing is performed on your server. ZIP files are only downloaded when an authorised administrator requests them. You decide if and where to upload an archive.

Does it monitor all site visitors?

No. It only captures the requests of the logged-in administrator who explicitly enabled recording. Other users’ requests are not profiled by this plugin.

Does RAW mean original SQL values are included?

No. RAW means the captured JSON Lines records are not deduplicated or summarised. Sensitive SQL literals and known URL credential parameters are redacted at collection time for both export types.

Why are my logs empty?

Ensure Query Monitor is activated, you are browsing with the same administrator account that activated capture, and the server allows a writable directory outside the public web root. Administrative requests are excluded unless you enable the corresponding checkbox.

What does the server need for ZIP downloads?

The PHP ZipArchive extension must be enabled to produce downloadable ZIP archives. Without it, the plugin displays an administrator-only error.

Does the plugin work on shared hosting?

Usually, if the host provides a private temporary directory writable by PHP. Otherwise, ask your hosting provider for a safe location and set QMDD_PRIVATE_STORAGE_DIR.

Will activating capture change how my site works?

The plugin attaches its own observation hooks for the active administrator, without wrapping or replacing third-party callbacks. It can add overhead, so use it for short debugging sessions and turn it off afterwards. It is not a background performance-monitoring service.

Is the time-per-plugin ranking exhaustive?

No. WordPress does not provide a public API for precise timings of arbitrary callbacks. The plugin measures individual callbacks only when they are isolated at a priority with free adjacent priorities. Other callbacks are omitted from the component-time ranking rather than estimating a misleading cost. Total action durations are recorded separately; timing is wall-clock, not an exact CPU profile.

Are AI token and price estimates exact?

No. They are heuristic estimates for comparison only, using an illustrative USD rate rather than any current provider price.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“digitalDot Diagnostics Export for Query Monitor” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.2.2

  • Renamed the plugin to clarify its independent relationship with Query Monitor.
  • Replaced callback mutation with non-invasive hook and isolated-callback probes.
  • Confined dependency and storage notices to their relevant administration screens.
  • Documented the partial nature of callback timing and preserved export formats.

1.2.1

  • Updated filesystem operations to WordPress filesystem APIs for private diagnostic storage.
  • Reused the WordPress alloptions cache to avoid redundant autoload SQL queries.
  • Hardened request metadata sanitation, download validation, and archive cleanup.
  • Revised export README generation and WordPress.org quality checks.

1.2.0

  • Prepared plugin headers, unique slug, readme and GPL licensing for WordPress.org.
  • Declared Query Monitor dependency via the WordPress dependency header.
  • Moved diagnostics out of the plugin and public folders into private storage.
  • Added best-effort redaction for SQL literals, URL credentials and diagnostic messages.
  • Limited hook profiling to explicit, administrator-only capture sessions.
  • Added input validation, protected POST log purging, nonce checks and safe redirects.
  • Hardened ZIP generation, local private temporary files and uninstall cleanup.
  • Added translation functions and made privacy practices explicit.

1.1.0

  • Original digitalDot diagnostic collector, per-hook profiler and ZIP exports.