83% toolkit-for-woocommerce

Code Review | Toolkit for WooCommerce

WordPress plugin Toolkit for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: toolkit-for-wooco...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0+
  • WordPress version: 6.3.1
  • First release: Dec 19, 2019
  • Latest release: Dec 19, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: geargag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.03ms] Passed 4 tests

A check of server-side resources used by Toolkit for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2041.08 ▲4.60
Dashboard /wp-admin3.59 ▲0.2950.11 ▲6.62
Posts /wp-admin/edit.php3.64 ▲0.2850.64 ▲2.06
Add New Post /wp-admin/post-new.php6.13 ▲0.2491.98 ▼8.87
Media Library /wp-admin/upload.php3.45 ▲0.2236.92 ▲2.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Toolkit for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10114.82 ▲0.432.01 ▲0.2947.63 ▲5.67
Dashboard /wp-admin2,231 ▲395.89 ▲0.91107.45 ▼3.5839.93 ▼1.56
Posts /wp-admin/edit.php2,110 ▲212.07 ▲0.0640.47 ▼2.8436.19 ▲0.76
Add New Post /wp-admin/post-new.php1,545 ▲1023.15 ▼0.32621.68 ▼82.0552.17 ▼0.21
Media Library /wp-admin/upload.php1,410 ▲224.25 ▲0.02100.16 ▲5.4643.83 ▲1.11

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'GearGag_WooCommerce_Toolkit\\tools\\contracts\\Bootable' not found in wp-content/plugins/toolkit-for-woocommerce/tools/contracts/Enqueueable.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GearGag_WooCommerce_Toolkit\\tools\\contracts\\Bootable' not found in wp-content/plugins/toolkit-for-woocommerce/Change_Paypal_Item_Name.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Tested up to: Invalid version format
  • Requires at least: Invalid version format
You can look at the official readme.txt

toolkit-for-woocommerce/index.php 92% from 13 tests

This is the main PHP file of "Toolkit for WooCommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("toolkit-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,740 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP325787252,481
JSON400138
SVG10055
JavaScript53041
Markdown118023
CSS2222

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.13
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces6
Interfaces6
Traits0
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes213.33%
Methods134
▷ Static methods64.48%
▷ Public methods10578.36%
▷ Protected methods139.70%
▷ Private methods1611.94%
Functions16
▷ Named functions1487.50%
▷ Anonymous functions212.50%
Constants35
▷ Global constants1234.29%
▷ Class constants2365.71%
▷ Public constants23100.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