10% wc-free-shipping

Code Review | WooCommerce Free Shipping

WordPress plugin WooCommerce Free Shipping scored10%from 54 tests.

About plugin

  • Plugin page: wc-free-shipping
  • Plugin version: 7.7.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2015
  • Latest release: May 30, 2023
  • Number of updates: 23
  • Update frequency: every 122.2 days
  • Top authors: pluginterritory (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /5,078 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > 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.02MB] [CPU: ▲0.23ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Free Shipping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.63 ▲6.80
Dashboard /wp-admin3.32 ▲0.0245.39 ▲0.29
Posts /wp-admin/edit.php3.37 ▲0.0246.41 ▼0.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.01 ▲12.28
Media Library /wp-admin/upload.php3.25 ▲0.0233.86 ▼6.09
Free Shipping /wp-admin/options-general.php?page=pt_wc_free_shipping_page3.1927.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
recovery_mode_email_last_sent
widget_theysaidso_widget
pt_wc_free_shipping_settings
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Free Shipping
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.371.75 ▲0.1544.09 ▲0.99
Dashboard /wp-admin2,199 ▲275.53 ▼0.1882.17 ▼16.2638.63 ▼8.38
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0132.94 ▼2.9431.54 ▼2.52
Add New Post /wp-admin/post-new.php1,536 ▲123.06 ▲5.13578.20 ▼29.7952.62 ▼15.67
Media Library /wp-admin/upload.php1,407 ▲74.18 ▲0.1195.86 ▼22.2939.69 ▼16.60
Free Shipping /wp-admin/options-general.php?page=pt_wc_free_shipping_page6851.516.4216.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • pt_wc_free_shipping_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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+351
    Uncaught Error: Class 'WC_Data_Store' not found in wp-content/plugins/wc-free-shipping/wc-free-shipping.php:351
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): pt_wc_free_shipping_check_is_enabled_admin_message()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin-header.php(303): do_action()
    #4 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wc-free-shipping === )
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "WooCommerce Free Shipping" version 7.7.1
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 an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin347 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110543261
PO File2344486

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
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 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin