84% run-sql-query

Code Review | Run SQL Query

WordPress plugin Run SQL Query scored84%from 54 tests.

About plugin

  • Plugin page: run-sql-query
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 1, 2016
  • Latest release: Aug 1, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: sefirost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /11,153 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.04ms] Passed 4 tests

A check of server-side resources used by Run SQL Query
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.76 ▼7.24
Dashboard /wp-admin3.31 ▲0.0148.18 ▼2.24
Posts /wp-admin/edit.php3.36 ▲0.0145.11 ▼4.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.21 ▼10.42
Media Library /wp-admin/upload.php3.24 ▲0.0136.88 ▼0.22
Run SQL Query /wp-admin/tools.php?page=run-sql-query3.2933.08

Server storage [IO: ▲0.09MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Run SQL Query: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.24 ▼1.381.57 ▼0.7240.29 ▼10.85
Dashboard /wp-admin2,210 ▲215.86 ▲0.92110.99 ▲2.6640.06 ▼4.50
Posts /wp-admin/edit.php2,093 ▲12.03 ▲0.0239.83 ▼2.2833.53 ▼1.76
Add New Post /wp-admin/post-new.php1,536 ▲2223.30 ▲5.91698.09 ▲8.9661.67 ▲8.21
Media Library /wp-admin/upload.php1,395 ▲74.19 ▲0.00110.91 ▲8.6848.03 ▲0.79
Run SQL Query /wp-admin/tools.php?page=run-sql-query9052.0325.9329.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/run-sql-query/admin/partials/run-sql-query-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: admin, query, phpmyadmin, manager, mysql...

run-sql-query/run-sql-query.php 92% from 13 tests

The entry point to "Run SQL Query" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin314 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP589243178
JavaScript2163114
CSS14022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png50.31KB25.85KB▼ 48.63%