89% woocommerce-coupon-shortcodes

Code Review | WooCommerce Coupon Shortcodes

WordPress plugin WooCommerce Coupon Shortcodes scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-coupo...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.9-6.4
  • WordPress version: 6.3.1
  • First release: Sep 14, 2013
  • Latest release: Nov 27, 2023
  • Number of updates: 94
  • Update frequency: every 39.6 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /67,765 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.54ms] Passed 4 tests

A check of server-side resources used by WooCommerce Coupon Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.20 ▼7.65
Dashboard /wp-admin3.34 ▲0.0344.80 ▼6.15
Posts /wp-admin/edit.php3.39 ▲0.0347.18 ▼6.33
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.23 ▼6.01
Media Library /wp-admin/upload.php3.26 ▲0.0332.62 ▼1.98

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Coupon Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7514.27 ▼0.441.91 ▼0.1038.73 ▼5.06
Dashboard /wp-admin2,199 ▲225.62 ▼0.0395.68 ▼1.3343.00 ▼3.68
Posts /wp-admin/edit.php2,104 ▲11.95 ▲0.0139.49 ▼0.5738.08 ▲1.76
Add New Post /wp-admin/post-new.php1,536 ▲623.29 ▼0.06578.12 ▼42.3056.71 ▲6.06
Media Library /wp-admin/upload.php1,407 ▲74.15 ▲0.0297.27 ▼3.4339.89 ▼1.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 | 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

woocommerce-coupon-shortcodes/woocommerce-coupon-shortcodes.php 92% from 13 tests

The primary PHP file in "WooCommerce Coupon Shortcodes" version 2.1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "7.9")

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
Success! There were no dangerous files found in this plugin1,924 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP52976931,924

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity68.00
▷ Minimum class complexity6.00
▷ Maximum class complexity296.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods58
▷ Static methods5594.83%
▷ Public methods4577.59%
▷ Protected methods00.00%
▷ Private methods1322.41%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants1058.82%
▷ Class constants741.18%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png3.69KB1.80KB▼ 51.16%