83% woo-free-shipping-per-product

Code Review | WooCommerce Free Shipping Per Product

WordPress plugin WooCommerce Free Shipping Per Product scored83%from 54 tests.

About plugin

  • Plugin page: woo-free-shipping...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2018
  • Latest release: Nov 10, 2023
  • Number of updates: 26
  • Update frequency: every 79.5 days
  • Top authors: waseem_senjer (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

3,000+ active /22,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.04ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Free Shipping Per Product
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.60 ▲1.78
Dashboard /wp-admin3.32 ▼0.0346.98 ▼8.91
Posts /wp-admin/edit.php3.37 ▲0.0146.95 ▲1.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.39 ▲6.48
Media Library /wp-admin/upload.php3.24 ▲0.0135.30 ▲1.26

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Free Shipping Per Product
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲5414.24 ▼0.021.95 ▲0.3241.70 ▲3.24
Dashboard /wp-admin2,192 ▲115.74 ▲0.0285.32 ▼18.2540.67 ▼6.68
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0537.48 ▼0.1034.40 ▲0.33
Add New Post /wp-admin/post-new.php1,535 ▲925.09 ▲1.94601.34 ▼113.4160.93 ▼7.97
Media Library /wp-admin/upload.php1,400 ▲64.19 ▼0.0294.55 ▼4.0041.58 ▲0.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 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 50% from 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
Please fix the following items
  • 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/woo-free-shipping-per-product/free-shippging-pre-product.php:116

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: woocommerce, shipping method, shipping, admin, free shipping...

woo-free-shipping-per-product/free-shippging-pre-product.php 69% from 13 tests

The main PHP script in "WooCommerce Free Shipping Per Product" version 1.2.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-free-shipping-per-product.php" instead of "free-shippging-pre-product.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "3.0")

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 detected234 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23780234

PHP code Passed 2 tests

This is a short overview 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.42
Average class complexity10.00
▷ Minimum class complexity8.00
▷ Maximum class complexity12.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected