90% lh-log-queries

Code Review | = LH Log Queries and hooks

WordPress plugin = LH Log Queries and hooks scored90%from 54 tests.

About plugin

  • Plugin page: lh-log-queries
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0
  • WordPress version: 6.3.1
  • First release: Apr 27, 2019
  • Latest release: Aug 9, 2022
  • Number of updates: 5
  • Update frequency: every 241.6 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /557 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.73ms] Passed 4 tests

Server-side resources used by = LH Log Queries and hooks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.77 ▼2.01
Dashboard /wp-admin3.32 ▲0.0243.91 ▼4.67
Posts /wp-admin/edit.php3.37 ▲0.0249.59 ▲1.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0277.56 ▼17.93
Media Library /wp-admin/upload.php3.24 ▲0.0136.61 ▲2.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by = LH Log Queries and hooks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.451.63 ▼0.1638.35 ▼3.88
Dashboard /wp-admin2,206 ▲185.90 ▼0.0098.04 ▼1.8939.88 ▼0.79
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0139.84 ▲4.2535.57 ▲0.72
Add New Post /wp-admin/post-new.php1,533 ▼023.25 ▲0.02667.59 ▼26.2853.21 ▲1.02
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0292.16 ▼6.2942.85 ▼1.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: query, developers, queries, developer, log

lh-log-queries/lh-log-queries.php Passed 13 tests

The main file in "= LH Log Queries and hooks" v. 1.02 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Adds a list of all queries and hook as a html comment.

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
Everything looks great! No dangerous files found in this plugin77 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2531677

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code1.04
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin