90% shipping-discount

Code Review | Shipping Discount for WooCommerce: Easy Make a Coupon for Shipping

WordPress plugin Shipping Discount for WooCommerce: Easy Make a Coupon for Shipping scored90%from 54 tests.

About plugin

  • Plugin page: shipping-discount
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 11, 2023
  • Latest release: Oct 12, 2023
  • Number of updates: 11
  • Update frequency: every 19.5 days
  • Top authors: situsali (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /1,492 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 gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.95ms] Passed 4 tests

An overview of server-side resources used by Shipping Discount for WooCommerce: Easy Make a Coupon for Shipping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.68 ▼3.35
Dashboard /wp-admin3.31 ▼0.0443.56 ▼24.52
Posts /wp-admin/edit.php3.36 ▲0.0043.33 ▲4.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.46 ▼12.70
Media Library /wp-admin/upload.php3.23 ▲0.0032.43 ▲0.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shipping Discount for WooCommerce: Easy Make a Coupon for Shipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.35 ▼0.271.64 ▼0.0437.62 ▼7.24
Dashboard /wp-admin2,192 ▲125.54 ▼0.1382.07 ▼12.1936.95 ▼9.72
Posts /wp-admin/edit.php2,097 ▼32.03 ▼0.0038.44 ▲0.9034.73 ▼2.70
Add New Post /wp-admin/post-new.php1,528 ▲222.91 ▼0.21661.15 ▲21.5455.16 ▲1.11
Media Library /wp-admin/upload.php1,400 ▼34.27 ▲0.0892.88 ▼10.2544.30 ▲2.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: coupon, kupon, shipping, simple, ongkir...

shipping-discount/shipping-discount.php 92% from 13 tests

The principal PHP file in "Shipping Discount for WooCommerce: Easy Make a Coupon for Shipping" v. 1.2.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin381 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP479167304
PO File1162849
JavaScript19028

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin