Skip to content

WordPress plugin

The PHPRay WordPress plugin gives you the application layer of PHPRay on any host — including shared hosting — without the PHP extension. Install from the WordPress.org repository: "PHPRay" in the plugin directory.

What it captures

  • per-request timing at the application layer (request start → shutdown hook; does not see time inside C extensions)
  • all SQL via the $wpdb query log, including N+1 grouping
  • outbound HTTP via the http_api filters (WP_Http)
  • PHP errors/warnings/notices during the request
  • components: every active plugin, theme and core area with inclusive vs self time — this is what makes "which plugin slows down /checkout/" a one-glance answer
  • level logic identical to the extension (smart thresholds, alert never sampled)

It produces the same JSONL trace record as the extension (trace format) — the collector, dashboard, CLI and PHPRay Cloud consume both without distinction.

Settings

Dashboard → PHPRay:

  • Modesmart / all / manual (same semantics as the extension)
  • Thresholds — normal/full/alert ms (defaults 200/1000/3000)
  • Profiling sample rate — percent of requests that get the per-function breakdown (default 3%)
  • Ignored URIs — comma list, same syntax as phpray.ignore_uris
  • Output — local file (per site) or PHPRay Cloud: paste a server_key (created in the console; the plugin uses home_url() host + ABSPATH as the site identity, ingest protocol §2)

Limits (honest)

  • It is a userland library: it cannot see the PHP core, C extensions, or time spent outside the request lifecycle hooks. The extension sees all of that; the plugin sees the application.
  • One plugin per site: it traces the site it is installed in, not other sites on the same account or VPS.
  • In smart mode it only profiles the sampled share; the summary layer is always on and cheap (a handful of hooks per request; see Overhead).