83% toolbar-jch-optimize

Code Review | Toolbar For JCH Optimize

WordPress plugin Toolbar For JCH Optimize scored83%from 54 tests.

About plugin

  • Plugin page: toolbar-jch-optimize
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2020
  • Latest release: Oct 5, 2021
  • Number of updates: 12
  • Update frequency: every 38.3 days
  • Top authors: sh.shouvo (91.67%)sabbirshouvo (16.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Toolbar For JCH Optimize
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.92 ▲10.60
Dashboard /wp-admin3.31 ▼0.0445.11 ▼13.54
Posts /wp-admin/edit.php3.36 ▲0.0045.34 ▼0.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.48 ▼11.21
Media Library /wp-admin/upload.php3.23 ▲0.0032.12 ▼1.33

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Toolbar For JCH Optimize
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.131.73 ▲0.1340.91 ▲1.44
Dashboard /wp-admin2,198 ▲215.67 ▲0.0784.07 ▼8.9337.41 ▼12.62
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0241.36 ▲4.4142.00 ▲6.86
Add New Post /wp-admin/post-new.php1,526 ▼223.20 ▲0.17673.11 ▼15.9859.28 ▲2.95
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.0096.27 ▼6.4841.26 ▼5.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toolbar-jch-optimize/jch-optimize-toolbar.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: jch optimize toolbar, page cache, clear cache, jch optimize, jch...

toolbar-jch-optimize/jch-optimize-toolbar.php 77% from 13 tests

The main file in "Toolbar For JCH Optimize" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("toolbar-jch-optimize.php" instead of "jch-optimize-toolbar.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,439 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP124617511,890
CSS1367214
Markdown1650179
JavaScript112989
JSON20067

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity30.38
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods120
▷ Static methods65.00%
▷ Public methods8470.00%
▷ Protected methods65.00%
▷ Private methods3025.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected