89% lh-log-sql-queries-to-file

Code Review | = LH Log sql queries to file

WordPress plugin = LH Log sql queries to file scored89%from 54 tests.

About plugin

  • Plugin page: lh-log-sql-querie...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Aug 7, 2022
  • Number of updates: 4
  • Update frequency: every 107.8 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /476 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.34ms] Passed 4 tests

Analyzing server-side resources used by = LH Log sql queries to file
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.20 ▼0.55
Dashboard /wp-admin3.39 ▲0.0945.23 ▼7.10
Posts /wp-admin/edit.php3.43 ▲0.0847.88 ▼12.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0981.52 ▼5.59
Media Library /wp-admin/upload.php3.29 ▲0.0733.93 ▲0.69

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • There were 2 files (124.87KB) illegally modified outside of "wp-content/plugins/lh-log-sql-queries-to-file/" and "wp-content/uploads/"
    • (new file) wp-content/post_requests.log
    • (new file) wp-content/all_sql_queries.log
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

= LH Log sql queries to file: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.111.94 ▲0.2747.73 ▲1.35
Dashboard /wp-admin2,206 ▲215.84 ▲0.94107.37 ▲4.0239.49 ▼0.71
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0241.12 ▲5.0235.25 ▲2.10
Add New Post /wp-admin/post-new.php1,533 ▼023.52 ▲0.32672.83 ▼1.7451.88 ▼0.87
Media Library /wp-admin/upload.php1,388 ▼34.19 ▲0.0197.64 ▼4.0740.92 ▼1.64

Uninstaller [IO: ▲0.13MB] [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 were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: log, log-file, queries, query, developer

lh-log-sql-queries-to-file/lh-log-sql-queries-to-file.php 92% from 13 tests

"= LH Log sql queries to file" version 1.00's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin185 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP219943185

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods1062.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected