10% wc-free-shipping

Code Review | WooCommerce Free Shipping

WordPress plugin WooCommerce Free Shipping scored 10% from 53 tests.

About plugin

  • Plugin page: wc-free-shipping
  • Plugin version: 5.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.8.1
  • First release: Sep 18, 2015
  • Latest release: Aug 6, 2021
  • Number of updates: 22
  • Update frequency: every 97.7 days
  • Top authors: pluginterritory (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

200+ active / 3,857 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wc-free-shipping/wc-free-shipping.php+39
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.06MB] [CPU: ▼251.25ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Free Shipping
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0635.25 ▲3.78
Dashboard /wp-admin3.12 ▲0.0737.91 ▲0.09
Posts /wp-admin/edit.php3.21 ▲0.1043.52 ▲2.31
Add New Post /wp-admin/post-new.php5.48 ▲0.0692.36 ▼1,002.98
Media Library /wp-admin/upload.php3.06 ▲0.0634.40 ▼4.40
Free Shipping /wp-admin/options-general.php?page=pt_wc_free_shipping_page3.0120.88

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 2 new options
New WordPress options
pt_wc_free_shipping_settings
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Free Shipping
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,677 ▲7116.11 ▲0.619.80 ▲1.3247.38 ▼3.71
Dashboard /wp-admin2,932 ▲796.08 ▲0.17146.59 ▲8.28104.12 ▼0.61
Posts /wp-admin/edit.php2,711 ▲52.68 ▼0.0069.89 ▲7.5788.54 ▼7.75
Add New Post /wp-admin/post-new.php1,656 ▲17518.78 ▲0.33365.75 ▼7.96118.41 ▲12.96
Media Library /wp-admin/upload.php1,780 ▲54.98 ▼0.02153.96 ▲0.26105.45 ▼13.27
Free Shipping /wp-admin/options-general.php?page=pt_wc_free_shipping_page8501.8536.8238.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 options in the database
    • pt_wc_free_shipping_settings
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pt_wc_free_shipping_page
    • > Error in wp-content/plugins/wc-free-shipping/wc-free-shipping.php+350
    Uncaught Error: Class 'WC_Data_Store' not found in /var/www/wordpress/wp-content/plugins/wc-free-shipping/wc-free-shipping.php:350Stack trace:#0 /var/www/wordpress/wp-includes/class-wp-hook.php(303): pt_wc_free_shipping_check_is_enabled_admin_message()#1 /var/www/wordpress/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()#2 /var/www/wordpress/wp-includes/plugin.php(470): WP_Hook->do_action()#3 /var/www/wordpress/wp-admin/admin-header.php(287): do_action()#4 /var/www/wordpress/wp-admin/admin.php(239): require_once('/var/www/wordpr...')#5 /var/www/wordpress/wp-admin/options-general.php(10): require_once('/var/www/wordpr...')#6 {main}thrown

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
  • 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/wc-free-shipping/wc-free-shipping.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wc-free-shipping === )
You can look at the official readme.txt

wc-free-shipping/wc-free-shipping.php Passed 13 tests

This is the main PHP file of "WooCommerce Free Shipping" version 5.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
Boost your sales with free shipping!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected346 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110543260
PO File2344486

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.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin