84% query-recorder

Code Review | Query Recorder

WordPress plugin Query Recorder scored84%from 54 tests.

About plugin

  • Plugin page: query-recorder
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.0
  • WordPress version: 6.3.1
  • First release: May 6, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 8
  • Update frequency: every 15.6 days
  • Top authors: bradt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /7,260 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Query Recorder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.72 ▲0.85
Dashboard /wp-admin3.33 ▼0.0251.42 ▼16.18
Posts /wp-admin/edit.php3.38 ▲0.0252.37 ▼0.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.60 ▼10.80
Media Library /wp-admin/upload.php3.25 ▲0.0238.47 ▼0.91
Query Recorder /wp-admin/options-general.php?page=query-recorder3.2634.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
query_recorder
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Query Recorder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17114.03 ▼0.588.88 ▲7.2243.93 ▲3.03
Dashboard /wp-admin2,242 ▲355.91 ▲0.95109.82 ▼3.7444.98 ▲2.20
Posts /wp-admin/edit.php2,124 ▲272.05 ▲0.0437.34 ▼0.2233.42 ▼8.16
Add New Post /wp-admin/post-new.php1,546 ▲123.17 ▲0.16625.83 ▼62.9958.76 ▼3.79
Media Library /wp-admin/upload.php1,424 ▲274.30 ▲0.15109.81 ▼9.0845.43 ▼4.48
Query Recorder /wp-admin/options-general.php?page=query-recorder1,0232.0827.7948.01

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/query-recorder/query-recorder.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/query-recorder/template/sidebar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/query-recorder/template/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: deployment, database, migrate, mysql

query-recorder/query-recorder.php Passed 13 tests

The main PHP script in "Query Recorder" version 1.0.1 is automatically included on every request by WordPress
46 characters long description:
Record SQL queries to a text file to run later

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin786 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP57539261
Sass2370194
CSS208181
JavaScript43338133
JSON10010
Ruby16127

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected