Limit Checker
WordPress plugin to log and test PHP configuration limits (memory, upload size, max_input_vars, execution time).
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/rahmanzadehm1/limit-checker/archive/refs/heads/main.zipReadme
Limit Checker
WordPress plugin that logs PHP configuration limit issues and provides admin tests for common php.ini settings.
Features
- Logs only PHP limit-related events (no unrelated PHP notices or warnings)
- Site-wide detection for
post_max_sizeviolations and upload limit errors - Admin page with color-coded PHP settings, status badges, and recommended values
- One AJAX test button per tracked setting
- Dynamic test payloads based on current
php.inivalues (limit + overrun) - Rolling log file (last 20 entries)
- Clear logs button (shown only when logs exist)
Requirements
- WordPress 5.0+
- PHP 7.4+
- cURL extension (recommended for large
post_max_size/upload_max_filesizetests on high limits)
Installation
- Clone or download this repository
- Place the plugin folder in
wp-content/plugins/(rename the folder tolimit-checkerif needed) - Activate Limit Checker in WordPress admin
- Open Limit Checker in the admin menu
Tracked PHP settings
| Setting | Description |
|---|---|
max_input_vars |
Maximum number of input variables per request |
memory_limit |
Maximum memory per script |
post_max_size |
Maximum POST body size |
upload_max_filesize |
Maximum uploaded file size |
max_execution_time |
Maximum script runtime in seconds |
Recommended values (WordPress hosting guidelines)
| Setting | Recommended | Acceptable | Below recommended |
|---|---|---|---|
max_input_vars |
≥ 3000 | ≥ 1000 | < 1000 |
memory_limit |
≥ 256M | ≥ 128M | < 128M |
post_max_size |
≥ 64M | ≥ 32M | < 32M |
upload_max_filesize |
≥ 64M | ≥ 32M | < 32M |
max_execution_time |
≥ 120s or 0 (unlimited) |
≥ 30s | < 30s |
Settings below the recommended threshold show a Recommended: … hint in the admin table.
How tests work
Each test sends a value slightly above the current limit:
| Setting | Overrun rule |
|---|---|
max_input_vars |
max(50, 5% of limit) extra fields |
post_max_size / upload_max_filesize |
max(1 KB, 1% of limit) extra bytes |
max_execution_time |
max(2s, 10% of limit) extra CPU time (busy-loop; sleep() is not counted by PHP on most hosts) |
memory_limit |
Allocates memory in 1 MB chunks until PHP errors |
Large payload tests (> 12 MB) are sent server-side via cURL when the browser cannot handle them reliably.
Log file
Logs are stored at:
wp-content/limit-check-log.log
This file is git-ignored. Only PHP limit messages are written.
Log entry types
| Type | Meaning |
|---|---|
TEST |
Result of an admin test button |
DETECT |
Automatic detection on a site request |
E_ERROR, E_WARNING, PHP, … |
Real PHP errors caught by the plugin handler |
Example:
[2026-06-24 21:30:00] [TEST] max_execution_time test started (ini limit: 30 s)...
[2026-06-24 21:30:30] [E_ERROR] Maximum execution time of 30 seconds exceeded in ...
Site-wide logging
The plugin logs limit issues across the site when PHP reports them or when they can be detected at runtime:
| Limit | Logged automatically? |
|---|---|
memory_limit |
Yes — on memory exhaustion |
max_execution_time |
Yes — when PHP enforces a fatal timeout |
post_max_size |
Yes — when CONTENT_LENGTH exceeds the limit |
upload_max_filesize |
Yes — on UPLOAD_ERR_INI_SIZE uploads |
max_input_vars |
Partial — when PHP emits a matching warning after WordPress loads |
Some limits (post_max_size, max_input_vars) may be enforced by PHP before WordPress loads; those are only logged when the request reaches the plugin.
Project structure
limit-checker/
├── limit-checker.php # Main plugin file
├── assets/
│ ├── css/admin.css # Admin table styles
│ └── js/admin.js # AJAX test UI
├── README.md
└── .gitignore
Changelog
- 1.9.3 — Real
max_execution_timetest via CPU busy-loop; recommended value hints in settings table - 1.9.2 — Dynamic test overrun; site-wide
post_max_sizedetection; cURL tests for large payloads - 1.9.1 — Log timestamp fix; upload/execution test improvements; color-coded settings table
- 1.9.0 — Log only PHP limit errors; fix test buttons; git-ready structure
- 1.8 — Added test buttons
- 1.7 — Reload button (removed in 1.9.0)
- 1.6 — 20-line log cap
- 1.5 — Clear log button
Author
License
GPL-2.0-or-later (WordPress plugin standard)