
Provides a way to queue Ajax calls in a considerably more performantly via an MU plugin. Allows processing these calls as a batch.
Reduce server load and increase reliabilty considerably by queuing selected Ajax and REST calls and process them in bulk later on. Load the entire WP system once for every x request.
The mechanism is based on catching the calls early in the WP lifecycle via an MU plugin, santizing and queuing. The queue system is based on Automattic’s own Action Scheduler plugin. The fields for sanitiation should be defined for security reasons.
Processing the calls : the calls are processed in bulk via a hook that is run by CRON.
Who is it for
At this stage the plugin is a developer level plugin and is intended to be used as such. It requires defining fields for sanitation.
However, it comes with a basic implementation for the latest PixelYourSite API calls and can be easily activated without further configuration for most cases.
The flow
- AJAX or REST call evoked in the client browser ->
- MU plugin catches the call if the configuration includes the specific action or route of the call ->
- Processor ( built-in or user defined ) checks the data and sanitizes it ->
- Data is stored in DB to be handled in queue. The data includes the call’s data and cookies ->
- Data is processed in batch via a recurring Action Scheduler hook. The processing is done via the same “Processor”.
- A row is completed only when its processor returns true. Failed rows retry with backoff and then remain visible for manual recovery.
Queue reliability
Queue rows move through pending, processing, completed, retry, failed, and cancelled states. Rows are claimed atomically one at a time so concurrent runners cannot process the same call. A PHP process that terminates unexpectedly leaves only its active row locked; stale locks are recovered automatically and later calls continue to advance.
The settings page shows queue totals grouped by AJAX/REST request and action. Failed rows can be retried, cancelled, or deleted without direct database access.
Anonymized endpoint diagnostics
When an endpoint request fails validation, the settings page can capture an anonymized diagnostic report. Start capture, reproduce the rejected request, and then use Copy debug report. Capture stops after the first validation failure or after ten minutes.
The report includes environment and processor configuration, the validation reason, and request field names, types, and sizes. It does not include request values, cookies, URLs, domains, IP addresses, user IDs, event IDs, nonces, or authorization data.
Replay processors
The admin Replay Processors builder supports sanitation-only integrations. Define an AJAX action or REST route, validation policy, and allowed parameter types. QACP then validates the captured request and internally replays its original WordPress handler during queue processing. Custom PHP processors remain available when an integration needs specialized processing logic.
Basic terminogoly
Processor : A class/instance that is used to define the data map of fields for sanitation and later on, for batch processing. In many cases, the Processor will be quite simple. Please check the built-in Processor class “class-pys.php” under the “qacp/Processors” directory.
Data Map : The map of fields and their respectable sanitation functions. There’s an example in the “qacp/qacp-how-to.txt” file.
REST route key : A configured REST route prefixed with “rest:”, for example “rest:pys-facebook/v1/event”.
Things to Remember
- The Processor should define clearly what are the received fields and their sanitation functions.
- The action and processor should be registerd. There’s an example in the “qacp/qacp-how-to.txt” file.
- A Processor must return true after successful processing. False, WP_Error, and exceptions are treated as failures.
Hooks
Screenshots

Statistics and logs of captured AJAX calls.

More general plugin options.
FAQ
Can I discover requests before enabling their queue?
Yes. The Requests tab supports timed or continuous AJAX/REST discovery and guest, logged-in, or all-visitor filters. Select individual requests for parameter inspection. Discovery records request keys and methods; inspection accumulates field names, nested paths, observed types and sizes, without saving parameter values or credentials. Inventory is limited to 200 entries and 128 observed fields per entry. Remove inventory entries to free space. Selected inspection follows its own capture duration.
Requests Counted shows cumulative traffic per request key and method during discovery or selected parameter inspection, respecting the visitor filter. Counts pause when neither applies and resume in later sessions. Existing and manually added entries start at zero; earlier traffic is not backfilled. Exact counting performs one atomic counter update per observed request, without rewriting unchanged schema metadata. Refresh the list to see current totals.
Can I test nested sanitation without sending an event?
The Testing tab sends a short-lived, single-use authorized request through the MU catcher. It runs the selected processor’s validation and the same recursive sanitizer used by the queue, showing sanitized output and schema differences. Guest tests omit login credentials; logged-in tests use the current administrator’s session. JSON and form-encoded samples are supported. Original handlers, REST permission callbacks and tracking delivery are not executed by this dry test. The separate guest queue-storage test remains available.
What happens when QACP cannot validate a live request?
From 1.1.25, QACP skips queueing and continues the regular WordPress lifecycle with the original request globals restored. The original AJAX or REST handler decides whether to accept the request using its own validation, permissions and nonce checks. This fallback does not approve unknown fields for queueing or bypass the original plugin’s security. Optional anonymized capture diagnostics can still record QACP’s reason. Fallback requests incur normal WordPress load and are benchmarked as regular traffic; the original response determines whether a timing sample is successful or rejected. Authorized diagnostic test endpoints remain isolated and do not fall back to executing tracking handlers.
Can I avoid storing cookies in the queue?
In Settings, uncheck Store cookies with queued requests and save. It is enabled by default to preserve existing integrations. New AJAX and REST queue entries then retain an empty cookie collection instead of copying request cookies, and processors receive that empty collection rather than the worker’s cookies. Cookie-dependent attribution, sessions or handlers may behave differently; test the integration before changing a production site.
This applies to newly captured requests only. Existing queue entries and backups are not purged, and older queued entries still use their saved cookies. It does not delete browser cookies, disable authentication or remove the separately stored user ID. It also does not remove cookie-derived tracking fields explicitly sent as allowed request parameters. Support exports include only the cookie-storage preference, never cookie values. No database migration is required.
Which requests appear in monitoring, and can I hide them permanently?
Monitoring now records and shows only POST requests in Requests, Schema changes, Testing and Benchmarks, including the affected-request summary. GET and other methods are not monitored. Older non-POST records remain stored for support diagnostics but do not appear in these views or consume the visible 200-entry inventory limit. Existing queue processors, replay configuration and queue health statistics are unchanged; this is a monitoring restriction, not a change to the lifecycle of queued requests.
Use Hide request in a request row to persistently exclude that request key from monitoring and these views. This applies to the whole AJAX action, rest: route or wc-ajax: endpoint, not to all AJAX or all REST requests. Hiding stops further discovery, inspection, schema-change counters, validation-fallback counters and timing writes for that key, including during subsequent recording sessions. Existing records, inspection selection, approved schema and queue configuration are retained. Hidden entries do not consume visible inventory slots. Expand Hidden requests in Requests and use Restore request to show saved records and resume monitoring. The hidden list is limited to 200 keys; restoring an archived entry requires a free visible inventory slot. Remove deletes only the inventory entry and is not a permanent exclusion. Support exports include hidden keys and retain historical records for diagnosis.
Can I count live requests that failed QACP validation?
Testing now contains Live recording results with separate tables for requests with schema differences and requests that failed capture validation. With Report schema changes on enabled requests selected in Requests, both categories are counted automatically on eligible queue-enabled routes, respecting the monitoring audience. Each request counts once per category even when several fields differ; a request can appear in both categories, so the totals must not be added together as unique traffic. Historical schema-change entries are retained warnings, not request counts, and cannot be backfilled. Schema differences do not always cause capture validation to fail.
The additional Record validation fallbacks timer in Testing is off by default, lasts 10 minutes, 15 minutes or one hour, and includes all visitors independently of the selected audience. It can count capture failures when automatic schema monitoring is off. Expiring or disabling this timer does not stop automatic monitoring. Stop capture in Requests stops discovery, inspection, benchmark sampling, automatic schema-change monitoring and timed recording; it does not disable queuing. Results remain until their separate clear buttons are used. Benchmark clearing and dismissing schema-change warnings do not clear these counters. A summary above the tabs links to Testing with View results. First/last UTC observation dates are shown; older counters have unknown dates rather than invented timestamps. Not recording with no saved counts does not mean every request passed.
These are QACP capture-validation failures that continue through normal WordPress handling, not errors returned by the original plugin. Schema counts apply to enabled routes supported by their processor, not observation-only WooCommerce routes. No request values or individual request logs are stored and dry tests are excluded. Each affected category adds an atomic database write per affected request; count updates are not benchmark-sampled. Counters share the bounded inventory and results are limited to 200 groups per category. Storage/inventory failures can miss observations but must never block normal handling. No earlier traffic is backfilled. The aggregate table is upgraded automatically to add nullable UTC dates while preserving existing counts; database ALTER permissions are required. Support exports include both categories and their dates as aggregate metadata, separate from request-time comparisons.
How are request timings compared?
Enable sampled benchmarks in Requests and reproduce the same interaction with its queue key disabled, then enabled. Benchmarks compare regular PHP request time with early queue-capture time side by side, including saved milliseconds and percentage reduction. Queue processing is neither measured nor included in this comparison. Regular timing stops at the start of WordPress shutdown; optimized timing stops after successful queue insertion, before the early response and shutdown tasks. Failed and rejected requests are counted separately, not used as successful baselines. Samples are observational, may differ in payload or load, and exclude responses served entirely by caches. The first sample for each request, method and mode is always retained; later traffic follows the configured rate, defaulting to 1 percent. Each group retains up to 1,000 samples. Opening Benchmarks refreshes the results; a Refresh button is also available. Clear timings before a new comparison, particularly after updating from older releases that included failed requests in averages. Regular calls are not replayed automatically to generate a baseline.
What happens when a queued request changes its parameters?
Schema Changes deduplicates unknown fields, unexpected structures, missing required fields and exceeded limits before sanitation. Existing processor validation still decides whether a request is accepted. New fields are never automatically approved. Configure and test an approved schema before enabling a queue key. Approved schemas and queue selection apply to the request key; methods remain subject to processor validation. Schema-change reporting is enabled by default for queue-enabled requests and can be disabled separately from discovery sessions.
Why does a saved schema still show a recorded difference?
Schema Changes is a deduplicated history, not a live validation result. Saving a schema does not remove previous warnings. Current rule shows whether that parameter is now Required, Optional or Unconfigured. Missing required means the request omitted a required value, or sent an empty string or null; adding the parameter to a schema does not supply it. Make genuinely optional fields optional. Dismiss the history and reproduce the request to check for new differences. New observations record query/body origin and their first recorded time; older observations may lack this metadata. Endpoint-looking parameter names should be investigated, not automatically approved or ignored.
Required flags may come from the processor defaults, without any manual selection. PixelYourSite REST requires event, data, ids and eventID for POST tracking events. Do not make those fields optional to accommodate GET requests: GET is not queueable by that processor. Known unsupported methods are unchecked and disabled in Requests, bypass early capture and do not generate payload-schema differences. Old differences for unsupported methods are hidden in Schema Changes but retained in support exports. Queue settings remain per request key across supported methods; inspection selection remains per key and method. Custom processors with unspecified methods retain their previous behavior; the qacp/requests/supported_methods filter can declare an array of supported HTTP methods.
REST monitoring uses the same parsed input as capture: POST body fields are not combined with query-only routing artefacts. Real unknown body fields are still reported. PixelYourSite REST defaults include optional utm_source, utm_medium, utm_campaign, utm_content and utm_term text fields under data, and a 2048-byte text limit for data.event_url, which may be schemeless. Existing approved schema overrides are preserved: add these optional fields and adjust the limit manually rather than resetting unrelated customizations. Historical POST differences remain until dismissed.
How can I export recorded data for support?
Use Export support data in the plugin admin panel to download JSON containing request inventory and counters, observed field metadata, recorded differences, registered/approved/effective schemas, processor configuration, queue totals, benchmark totals and environment/MU diagnostics. This administrator-only export excludes request values, queued payloads, cookies, credentials, nonce values, server paths and raw error messages. Request identifiers and parameter names remain: review these before sharing. Large sections are capped and report truncation flags; unavailable sections are listed without exposing database errors. This is a diagnostic export, not a backup or restore file.
Support report format 2 also includes up to 100 queue record diagnostics, prioritizing failed/retrying and pending records. These show internal queue row numbers (not tracking event IDs), request methods, status, attempts, queue timestamps, coded errors and current worker processor lookup. Metadata is read from bounded serialized payloads with object instantiation disabled; payload values are never exported. New captures from 1.1.22 retain the generated catcher version and processor class. Older records without that metadata report an unknown capture version rather than inferring one. Installed header version, runtime plugin version and loaded MU version help distinguish current code from historical record provenance. Current worker lookup is not evidence of what was loaded at the time of a past failure, and an unsupported method is reported separately from processor-registration errors. Unknown errors are redacted, not copied.
Can I observe WooCommerce wc-ajax requests?
Yes. Requests such as /?wc-ajax=ppc-cart-script-params appear as wc-ajax:ppc-cart-script-params. In Requests, activate discovery and choose All visitors, Guests or Logged-in users. Administrators are included in Logged-in users. To collect parameter metadata, select Inspect parameters for the request and activate parameter inspection. Monitoring is bounded and respects the selected duration and audience; request values are not retained. The wc-ajax routing key is excluded from query parameter metadata.
WooCommerce AJAX entries are observation-only: normal WooCommerce handlers and responses are never intercepted or queued, even if an action mapping matches. Benchmarks can record regular lifecycle timings, but no optimized comparison exists for these entries. Testing lists discovered entries and can run approved-schema sanitation/difference checks after Configure and Save; it does not execute checkout/payment handlers or verify their permissions, nonces or business rules. No processor is required for this schema-only test. Refreshing Testing does not start discovery or replay earlier traffic.
ChangeLog
1.1.33
- Add a configurable backup and cleanup interval, defaulting to 60 minutes. Process all eligible records in batches and remove routine table optimization.
- Preserve completed and cancelled counts by request during cleanup. Show the number of completed rows still stored separately from the cumulative total.
1.1.32
- Show SQL, deleted row count, elapsed time and database errors after manual completed-queue cleanup.
1.1.31
- Add Store cookies with queued requests in Settings, enabled by default for compatibility. When disabled, new AJAX/REST entries contain an empty cookie collection without altering live request cookies or authentication.
- Retain compatibility with previously queued payloads and include the preference in value-free support exports. Existing queue entries, backups, user IDs and allowed request parameters are unchanged.
1.1.30
- Limit discovery, inspection, counters, schema-change views, Testing and Benchmarks to POST requests. Retain old non-POST history for support and leave queue processing unchanged.
- Add persistent per-request hiding with a collapsed Hidden requests list and Restore request controls. Hidden keys bypass all monitoring writes and visible inventory limits without deleting historical data, schemas or queue settings.
1.1.29
- Count affected requests whenever enabled-route schema-change monitoring is active, separately from actual capture-validation failures. Retain the optional all-visitor timed recorder without double-counting overlapping modes.
- Show persistent live results, explicit recording states and first/last UTC observations in Testing, with a summary and View results above tabs. Keep category clearing, schema-warning dismissal and benchmark clearing independent.
- Upgrade aggregate storage without dropping existing counts, retain unknown dates on old records, and include counter dates in support exports. Stop capture now also stops automatic schema-change monitoring.
1.1.28
- Discover WooCommerce wc-ajax query endpoints with request counts, selected parameter inspection and regular lifecycle timings, respecting guest/logged-in audience filters and monitoring durations.
- Mark WooCommerce AJAX observation-only and prevent queue capture. Add safe schema-only dry tests without executing checkout or payment handlers; exclude query routing metadata from observed parameters.
1.1.27
- Keep the Validation fallbacks panel visible above the tabs after recording expires, including when no counts exist. Show recording status and an explicit empty state; retain refresh access and saved counts.
1.1.26
- Add off-by-default, time-limited live validation-fallback recording in Testing. Count AJAX/REST request keys and methods without request values; show cumulative counts above the tabs with refresh and clear controls.
- Keep counters independent from benchmark sampling/clearing and preserve normal lifecycle fallback even when counter storage fails. Include recording settings in support exports; no new database schema is required.
1.1.25
- Fall back to the regular WordPress lifecycle when QACP’s capture validation fails, instead of terminating with request validation error. The original AJAX/REST handler retains its own permission, nonce and payload checks.
- Restore original POST, GET and REQUEST globals before fallback; preserve successful early capture and isolated diagnostic test behavior. Optional diagnostic failures do not block normal handling.
- Measure fallback traffic as regular lifecycle requests, not as requests rejected by QACP. This release does not change the disabled-route background processor lookup issue.
1.1.24
- Standardize single-line admin input and select heights, and center button labels and icons. Retain native checkbox/radio sizes, multiline textareas and hidden controls; use larger control heights on mobile.
1.1.23
- Show queue statistics and recovery controls above the admin tabs so they remain visible in every view. Keep configuration and processor controls in Settings, which remains the default tab.
1.1.22
- Expand administrator support exports with bounded per-record queue diagnostics: method, attempts, timestamps, coded errors and current worker registry/result-awareness checks, excluding request values and raw errors.
- Record catcher version and processor class on new captures; label unavailable historical versions as unknown. Report installed header and loaded MU versions separately from runtime plugin and historical records.
- Preserve queue processing behavior and existing records; no automatic retries, deletion or schema changes are performed by diagnostic export.
1.1.21
- Respect known processor methods in early capture, request queue controls and schema-change reporting. PixelYourSite REST GET no longer mirrors POST queue selection or generates misleading missing-required warnings. Preserve unknown custom-processor behavior and method-specific inspection.
- Align REST monitoring with capture input so query-only routing artefacts are not reported as POST body fields. Hide historical differences for unsupported methods without deleting support evidence.
- Add optional UTM fields and a 2048-byte schemeless event URL text limit to PixelYourSite REST defaults. Preserve approved overrides and document required processor defaults and manual override adjustments.
1.1.20
- Add an administrator-only support JSON export of recorded metadata, schemas, processor settings and aggregate queue/benchmark statistics, excluding request values, payloads and raw errors.
- Distinguish historical schema differences from each parameter’s current Required, Optional or Unconfigured rule. Document missing-required semantics and retained history.
- Record query/body origin and first-observed time for new schema differences without repeatedly rewriting unchanged observations.
1.1.19
- Make Settings the first and default admin tab, merging general queue statistics and recovery controls into the same view without removing settings or processor controls.
- Preserve existing request/testing/benchmark links and redirect former Queue-tab links to the combined Settings view.
1.1.18
- Compare regular and optimized AJAX/REST request times side by side, with sample counts, ranges, saved milliseconds and percentage reduction. Exclude background queue processing and failed requests from successful comparisons.
- Refresh benchmarks when opening the tab and add a Refresh button, active-session status and timing-storage errors instead of silently showing an empty table.
- Retain the first sample per request, method and mode before applying the percentage sampler. Arm timing independently of parameter inspection, finish optimized capture before response/shutdown, and measure regular calls at the start of WordPress shutdown with a guarded PHP fallback.
1.1.17
- Bring the request schema editor into view after Configure. Review focuses the affected observed or approved parameter instead of only switching tabs.
- Show schema loading and failures prominently, hide stale editors on failed loads, and retain schema-save confirmation. Add browser regression coverage for long request lists and failed detail requests.
1.1.16
- Add cumulative per-request-key and method counters to Requests. Count matching traffic during discovery or selected parameter inspection with atomic increments, respecting visitor filters. Counters pause outside these sessions; earlier traffic is not backfilled.
- Upgrade the inventory table automatically without losing existing schemas or changes. Exact counting requires one counter update per observed request; unchanged schema metadata still avoids updates.
1.1.15
- Add Requests, Schema Changes, Testing and Benchmarks admin tabs while retaining queue controls and settings.
- Add bounded, timed or continuous request discovery, manual request keys, visitor filters and selective parameter inspection. Deduplicate metadata and schema changes; unchanged observations do not write new records.
- Add approved nested sanitation schemas for enabled or disabled request keys, reviewed processor drafts and administrator-authorized guest/logged-in dry tests with JSON or form encoding.
- Fix recursive sanitation to apply array_fields to each object in a list, preserve inherited array sanitation and bound nested structures. Generic replay validation now checks nested required fields, structures, numeric types, limits and unknown fields.
- Preserve raw quotes and backslashes during early MU parsing, initialize nonce authentication before captured-request validation, and defer visitor-filter authentication on ordinary requests until plugins have loaded. Support same-host PixelYourSite testing on local ports.
- Add sampled regular, optimized-capture, rejected-request and background-processing timings with counts, means, minimums, maximums and errors. Create separate inventory and timing tables automatically on upgrade.
1.1.14
1.1.13
- Add a Tests section with a guest-request button, editable sample text, HTTP and validation results, and copyable diagnostics.
- Send the test from the browser without cookies or login credentials, authorized by a short-lived, single-use token issued only to administrators.
- Exercise a dedicated MU test endpoint, the configured PixelYourSite REST validator, and the shared queue writer. Verify and remove an inert cancelled test row without sending tracking events.
- Report configuration, validation, storage, cleanup and request errors. This test does not verify scheduled queue processing or delivery to Meta.
1.1.12
- Fix the WooCommerce HPOS compatibility declaration to reference the main qacp.php plugin file instead of class-qacp.php, resolving the FeaturesController “Invalid plugin file” log message.
1.1.11
- Verify installed MU catcher contents during normal plugin startup and repair stale, missing, or relocated copies, even when the version number has not changed.
- Replace the MU file through a verified temporary file instead of deleting the working file first. Retry failed updates without recording a successful version upgrade.
- Request OPcache invalidation after replacement and on activation, version upgrades, and diagnostic capture startup.
- Fix activation and deactivation hook paths on Linux servers.
- Add an admin notice for failed MU updates and anonymized MU file verification and cache invalidation results to debug reports.
1.1.10
- Fix the MU catcher skipping AJAX and REST requests when installed under the WordPress repository directory name. Detect the active plugin using its actual installation path instead of hardcoding qacp/qacp.php.
- Recognize network activation when checking whether the MU catcher should run.
- Refresh the installed MU catcher on upgrade through the existing version update mechanism.
1.1.9
- Repackage the complete plugin after the initial WordPress repository 1.1.8 download omitted 16 PHP files.
- Include missing Action Scheduler classes, including ActionScheduler_RecurringActionScheduler, whose absence caused a fatal error during WordPress startup.
- Include the PixelYourSite REST and generic replay processors missing from that download.
- Issue a new version so sites running the incomplete 1.1.8 package receive the repair through the normal WordPress update process. No queue processing behavior changes from the complete 1.1.8 release.