84% woo-toolkit

Code Review | WooCommerce Toolkit

WordPress plugin WooCommerce Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: woo-toolkit
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2019
  • Latest release: Apr 27, 2022
  • Number of updates: 15
  • Update frequency: every 79.3 days
  • Top authors: nazmulhassann20 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.53ms] Passed 4 tests

Server-side resources used by WooCommerce Toolkit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.17 ▼2.22
Dashboard /wp-admin3.31 ▼0.0345.40 ▼17.25
Posts /wp-admin/edit.php3.36 ▲0.0148.06 ▲7.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.09 ▼23.11
Media Library /wp-admin/upload.php3.24 ▲0.0130.85 ▲0.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Toolkit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.43 ▼0.941.83 ▼0.1841.95 ▼0.74
Dashboard /wp-admin2,206 ▲155.86 ▲0.00104.79 ▼3.5036.23 ▼6.31
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0441.14 ▼0.8836.36 ▲0.52
Add New Post /wp-admin/post-new.php1,514 ▼017.69 ▲0.08663.35 ▲23.6158.19 ▲8.58
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.2393.25 ▼6.4844.69 ▲1.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • baseplugin_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-toolkit/includes/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: widget, order, promotion, product, woocommerce...

woo-toolkit/toolkit.php 85% from 13 tests

The principal PHP file in "WooCommerce Toolkit" v. 1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-toolkit.php" instead of "toolkit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin149 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26397149

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin