WP Manifestindependent plugin directory
manifest / developer / aavoya-memory-monitor

Aavoya Memory Monitor

Simple Memory Monitor tool for WordPress

by Aavoya Software · github.com/pijushgupta/aavoya-memory-monitor

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/pijushgupta/aavoya-memory-monitor/archive/refs/heads/main.zip

Aavoya Memory Monitor — User Guide

Aavoya Memory Monitor Dashboard

Aavoya Memory Monitor (AMM) is a powerful, low-overhead WordPress plugin designed for developers and administrators to track memory consumption in real-time. It identifies "memory leaks" by profiling specific WordPress hooks and provides a safety-first synthetic load tester.


🚀 Getting Started

Installation

  1. Upload the aavoya-memory-monitor folder to /wp-content/plugins/.
  2. Activate the plugin via the WordPress admin.
  3. Access the dashboard from the Memory menu in the sidebar.

📊 Dashboard & Metrics

The Logs tab is your primary diagnostic area.

Stats Banner

  • Total Logs: Records of every request (or just spikes, depending on settings).
  • Total Spikes: Number of requests exceeding your defined threshold.
  • Avg/Max Peak: Crucial benchmarks for server capacity planning.

Understanding the Table

  • Start (MB): The baseline memory used when WordPress initializes.
  • Peak (MB): The absolute maximum memory reached during that request.
  • Usage %: Percentage of your server's memory_limit used.
    • Amber (75%+): Caution territory.
    • Red (90%+): Immediate danger of critical failure (WSOD).
  • Type: Categorizes traffic into Web, Ajax, or Cron.

🔍 Hook Profiling (Deep Dive)

Click any log row to expand the Hook Detail view. This table lists the specific WordPress hooks that consumed the most memory during that request.

  • Hook Name: The standard WP action or filter.
  • Usage (MB): Peak memory reached at the end of that hook.
  • Delta: The specific amount of memory added by that hook alone. Use this to find the exact plugin or function causing spikes.

⚡ Synthetic Load Tester

AMM includes a built-in utility to test how your server handles memory spikes.

  1. Go to Settings > Tools.
  2. Enter a value (e.g., 128MB) and click Run Test.
  3. The tool will safely allocate the requested memory and report back.

Safety Note: AMM includes a "Fatal Crash Protection" layer. If you request a spike that would likely crash your server, the tool will gracefully abort and show a warning page instead of a white-screen fatal error.


⚙️ Settings

  • Spike Threshold: Define what constitutes a "spike" for your environment. (Default: 128MB).
  • Auto-Purge: Automatically deletes logs older than 1 day, 1 week, or 1 month to keep your database lean.
  • Capture Hooks: Disable this if you only need high-level monitoring and want to minimize overhead on extremely high-traffic sites.

🛠️ Developer Technical Notes

Baseline Measurement

AMM establishing its "Start" baseline during plugins_loaded. This captures the memory footprint of your active plugins and theme before any content-specific logic fires.

Peak Recording

The final measurements are recorded during the PHP shutdown sequence, ensuring even the latest-firing actions are captured in the "Peak" metric.


Developed by Aavoya.