89% wc-free-shipping-per-package

Code Review | Free Shipping Per Package For WooCommerce

WordPress plugin Free Shipping Per Package For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-free-shipping-...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2021
  • Latest release: Oct 31, 2023
  • Number of updates: 18
  • Update frequency: every 45.5 days
  • Top authors: oneteamsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,129 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.06MB] [CPU: ▼7.22ms] Passed 4 tests

Analyzing server-side resources used by Free Shipping Per Package For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0633.96 ▼7.71
Dashboard /wp-admin3.37 ▲0.0642.99 ▼7.90
Posts /wp-admin/edit.php3.48 ▲0.1246.63 ▼0.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0676.83 ▼12.42
Media Library /wp-admin/upload.php3.29 ▲0.0636.15 ▼0.84

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Free Shipping Per Package For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5014.75 ▲0.361.48 ▼0.1337.68 ▼7.24
Dashboard /wp-admin2,206 ▲325.63 ▲0.0692.23 ▼20.2043.16 ▲1.54
Posts /wp-admin/edit.php2,111 ▲82.14 ▲0.1139.86 ▲4.8835.57 ▼1.37
Add New Post /wp-admin/post-new.php1,544 ▲1818.29 ▼4.78612.13 ▼189.2377.51 ▲23.41
Media Library /wp-admin/upload.php1,408 ▲84.26 ▲0.03103.71 ▼11.4042.37 ▼6.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 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 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 smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

wc-free-shipping-per-package/wc-free-shipping-per-package.php 92% from 13 tests

Analyzing the main PHP file in "Free Shipping Per Package For WooCommerce" version 1.0.9
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,277 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP243192211,277

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity4.95
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes22
▷ Abstract classes29.09%
▷ Concrete classes2090.91%
▷ Final classes00.00%
Methods83
▷ Static methods11.20%
▷ Public methods6881.93%
▷ Protected methods1214.46%
▷ Private methods33.61%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/1TeamSoftware-logo.png14.55KB4.50KB▼ 69.05%
assets/images/1TeamSoftware-icon.png0.59KB0.75KB0.00%