89% woocommerce-advanced-free-shipping

Code Review | WooCommerce Advanced Free Shipping

WordPress plugin WooCommerce Advanced Free Shipping scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-advan...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-8.0
  • WordPress version: 6.3.1
  • First release: Apr 24, 2014
  • Latest release: Aug 9, 2023
  • Number of updates: 68
  • Update frequency: every 49.9 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

122 reviews

Install metrics

50,000+ active /437,868 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.17ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Advanced Free Shipping
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.48 ▼1.95
Dashboard /wp-admin3.33 ▲0.0246.60 ▼7.13
Posts /wp-admin/edit.php3.38 ▲0.0248.03 ▼1.33
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.18 ▼16.20
Media Library /wp-admin/upload.php3.25 ▲0.0237.90 ▼3.39

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Advanced Free Shipping
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.41 ▲0.011.74 ▲0.2040.92 ▼8.15
Dashboard /wp-admin2,203 ▲185.80 ▲0.91110.56 ▼23.5345.49 ▲2.39
Posts /wp-admin/edit.php2,068 ▼242.04 ▲0.0636.70 ▼2.4431.76 ▼4.70
Add New Post /wp-admin/post-new.php1,543 ▲2422.75 ▼0.58623.61 ▼36.1388.55 ▲24.07
Media Library /wp-admin/upload.php1,388 ▼04.09 ▼0.12109.10 ▼16.8947.37 ▲3.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

woocommerce-advanced-free-shipping/woocommerce-advanced-free-shipping.php 92% from 13 tests

The main PHP script in "WooCommerce Advanced Free Shipping" version 1.1.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,409 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP591,2607362,692
PO File64716751,051
Sass2397311
JavaScript77145272
YAML11042
JSON20039
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.22
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods227
▷ Static methods20.88%
▷ Public methods22398.24%
▷ Protected methods00.00%
▷ Private methods41.76%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
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
PNG images were not found in this plugin