Simple SQL Query Analyzer
Analyze SQL queries with EXPLAIN/ANALYZE, view database structures, and export for LLM integration.
by soarerobertdaniel7 · github.com/soare-robert-daniel/wp-sql-query-report
★ 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/soare-robert-daniel/wp-sql-query-report/archive/refs/heads/main.zipSQL 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
- Upload
simple-sql-query-analyzerfolder to/wp-content/plugins/ - Activate in WordPress admin
- 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
- Enter a SELECT query
- Click "Analyze"
- View EXPLAIN results and table structure
- 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 |