78% sql-executioner

Code Review | SQL Executioner

WordPress plugin SQL Executioner scored78%from 54 tests.

About plugin

  • Plugin page: sql-executioner
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Sep 28, 2016
  • Number of updates: 11
  • Update frequency: every 129.3 days
  • Top authors: justincwatt (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /45,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.80ms] Passed 4 tests

An overview of server-side resources used by SQL Executioner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.63 ▼1.77
Dashboard /wp-admin3.36 ▲0.0149.05 ▼14.63
Posts /wp-admin/edit.php3.41 ▲0.0547.29 ▲0.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.05 ▼11.10
Media Library /wp-admin/upload.php3.28 ▲0.0537.94 ▲1.10
SQL Executioner /wp-admin/tools.php?page=sql-executioner3.2933.24

Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

SQL Executioner: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.241.77 ▼0.1047.94 ▲6.08
Dashboard /wp-admin2,199 ▲195.50 ▼0.1283.62 ▼10.9042.11 ▼0.39
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0437.56 ▼0.9635.25 ▼0.46
Add New Post /wp-admin/post-new.php1,531 ▲523.23 ▲0.24660.48 ▲59.6350.17 ▼3.41
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.01105.41 ▲10.3045.04 ▲1.60
SQL Executioner /wp-admin/tools.php?page=sql-executioner8392.0028.1228.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=sql-executioner
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=sql-executioner
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/sql-executioner/form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sql-executioner/sql-executioner.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (This is what you get after describing the posts table.)
Please take inspiration from this readme.txt

sql-executioner/sql-executioner.php Passed 13 tests

The main PHP file in "SQL Executioner" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
92 characters long description:
Execute SQL commands on your WordPress database. Goto Tools > SQL Executioner to operate.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected164 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33227141
JavaScript11012
CSS12011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png103.18KB26.40KB▼ 74.42%