84% free-shipping-kit

Code Review | Free Shipping Kit

WordPress plugin Free Shipping Kit scored84%from 54 tests.

About plugin

  • Plugin page: free-shipping-kit
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2022
  • Latest release: Jun 23, 2023
  • Number of updates: 26
  • Update frequency: every 20.6 days
  • Top authors: mcarter76 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,044 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.22ms] Passed 4 tests

Server-side resources used by Free Shipping Kit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.87 ▲0.07
Dashboard /wp-admin3.39 ▲0.0946.64 ▼7.74
Posts /wp-admin/edit.php3.50 ▲0.1547.89 ▼5.24
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.81 ▲1.97
Media Library /wp-admin/upload.php3.31 ▲0.0836.06 ▲0.03

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Free Shipping Kit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.101.84 ▲0.2842.77 ▲3.83
Dashboard /wp-admin2,195 ▲155.63 ▼0.0489.64 ▼1.3138.64 ▼3.85
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0339.83 ▼3.0436.09 ▼1.91
Add New Post /wp-admin/post-new.php1,528 ▼023.18 ▲0.31619.73 ▼43.7551.61 ▼0.90
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.00102.24 ▲1.6743.96 ▼0.82

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 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • 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)
Good news, no errors were detected

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/free-shipping-kit/public/partials/free-shipping-kit-public-display.php
    • > /wp-content/plugins/free-shipping-kit/admin/partials/free-shipping-kit-admin-display.php

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 Passed 29 tests

readme.txt Passed 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
7 plugin tags: per product free shipping, free shipping, product based free shipping, flat rate shipping, e-commerce...

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

This is the main PHP file of "Free Shipping Kit" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
79 characters long description:
Display a FREE Shipping badge on WooCommerce product category and detail pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected628 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12168546317
JavaScript26444155
PO File1273180
CSS210874
JSON2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin