WP Manifestindependent plugin directory
manifest / developer / wp-sql-query-report

Simple SQL Query Analyzer

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/soare-robert-daniel/wp-sql-query-report/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

SQL Analyzer

WordPress plugin to analyze SQL queries with EXPLAIN plans and export reports for LLM optimization.

Requirements

  • WordPress 6.7+, PHP 7.4+, MySQL 5.6+ (MySQL 8.0+ for EXPLAIN ANALYZE)

Install

  1. Upload simple-sql-query-analyzer folder to /wp-content/plugins/
  2. Activate in WordPress admin
  3. Go to Tools > SQL Analyzer

Development Setup

npm install && composer install
npm run build

Commands

npm run build          # Production build
npm run build:watch    # Dev watch mode
npm run lint           # Lint JS/TS

composer lint          # Check PHP standards
composer lint:fix      # Auto-fix PHP
composer phpstan       # Static analysis

Usage

  1. Enter a SELECT query
  2. Click "Analyze"
  3. View EXPLAIN results and table structure
  4. Export to LLM via copy/download

REST API

POST /wp-json/simple-sql-query-analyzer/v1/analyze
{
    "queries": [{ "id": "1", "label": "My Query", "query": "SELECT ..." }],
    "include_analyze": false
}

Requires: WordPress REST nonce + manage_options capability

Troubleshooting

Problem Solution
"Query contains invalid SQL" Only SELECT queries allowed
EXPLAIN ANALYZE unavailable Requires MySQL 8.0.18+
Assets not loading Run npm run build