94% add-free-shipping-text-on-cart-page

Code Review | Add Free shipping text For WooCommerce Cart

WordPress plugin Add Free shipping text For WooCommerce Cart scored 94% from 54 tests.

About plugin

  • Plugin page: add-free-shipping...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.9.2
  • First release: Jan 22, 2020
  • Latest release: Dec 11, 2021
  • Number of updates: 9
  • Update frequency: every 76.6 days
  • Top authors: kinjaldalwadi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 418 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Add Free shipping text For WooCommerce Cart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0154.12 ▲2.07
Dashboard /wp-admin3.41 ▲0.0133.72 ▼1.76
Posts /wp-admin/edit.php3.64 ▲0.0137.22 ▼0.03
Add New Post /wp-admin/post-new.php6.88 ▼0.09105.15 ▼1,188.61
Media Library /wp-admin/upload.php3.30 ▲0.0024.28 ▼0.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Add Free shipping text For WooCommerce Cart: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲8215.93 ▼0.095.66 ▼0.782.73 ▼0.06
Dashboard /wp-admin2,909 ▲486.12 ▼0.18114.47 ▼22.00146.42 ▼15.30
Posts /wp-admin/edit.php2,704 ▲163.24 ▲0.0163.46 ▼2.87143.52 ▲0.37
Add New Post /wp-admin/post-new.php1,730 ▲6919.96 ▲3.83406.51 ▼54.45156.71 ▼0.34
Media Library /wp-admin/upload.php1,716 ▲185.53 ▲0.09135.09 ▼3.16157.16 ▼33.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/add-free-shipping-text-on-cart-page/woocommerce-add-free-shipping-text-cart.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention: The official readme.txt is a good inspiration

add-free-shipping-text-on-cart-page/woocommerce-add-free-shipping-text-cart.php 92% from 13 tests

The primary PHP file in "Add Free shipping text For WooCommerce Cart" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("add-free-shipping-text-on-cart-page.php" instead of "woocommerce-add-free-shipping-text-cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin12 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP221412

PHP code Passed 2 tests

An short overview of 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.25
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%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin