89% hcgroup-shipping-for-woocommerce

Code Review | HCGroup Shipping for Woocommerce

WordPress plugin HCGroup Shipping for Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: hcgroup-shipping-...
  • Plugin version: 2.2.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2019
  • Latest release: May 26, 2021
  • Number of updates: 42
  • Update frequency: every 14.1 days
  • Top authors: hcgroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /886 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.04ms] Passed 4 tests

A check of server-side resources used by HCGroup Shipping for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.43 ▼1.56
Dashboard /wp-admin3.39 ▲0.0956.25 ▼3.34
Posts /wp-admin/edit.php3.44 ▲0.0955.64 ▼1.55
Add New Post /wp-admin/post-new.php5.97 ▲0.0990.99 ▼9.72
Media Library /wp-admin/upload.php3.31 ▲0.0941.72 ▲0.73

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for HCGroup Shipping for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.281.80 ▼0.5843.09 ▼4.23
Dashboard /wp-admin2,198 ▲215.57 ▼0.0096.07 ▼5.4442.57 ▼10.46
Posts /wp-admin/edit.php2,097 ▼61.97 ▼0.0635.00 ▼5.6735.63 ▼1.49
Add New Post /wp-admin/post-new.php1,535 ▲918.71 ▼4.81646.19 ▼14.9776.35 ▲22.81
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0396.88 ▼17.0741.40 ▼4.91

Uninstaller [IO: ▲0.00MB] [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 detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

hcgroup-shipping-for-woocommerce/hcgroup_shipping.php 85% from 13 tests

"HCGroup Shipping for Woocommerce" version 2.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hcgroup-shipping-for-woocommerce.php" instead of "hcgroup_shipping.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected355 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16425355

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected