89% woocommerce-auto-added-coupons

Code Review | WooCommerce Extended Coupon Features FREE

WordPress plugin WooCommerce Extended Coupon Features FREE scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-auto-...
  • Plugin version: 3.3.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2014
  • Latest release: Mar 11, 2023
  • Number of updates: 194
  • Update frequency: every 16.4 days
  • Top authors: josk79 (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

20,000+ active /450,020 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by WooCommerce Extended Coupon Features FREE
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.47 ▼2.87
Dashboard /wp-admin3.33 ▼0.0243.05 ▼20.49
Posts /wp-admin/edit.php3.38 ▲0.0245.40 ▲0.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.34 ▼8.28
Media Library /wp-admin/upload.php3.25 ▲0.0235.65 ▲3.98

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Extended Coupon Features FREE
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.51 ▲0.161.65 ▼0.0643.90 ▲0.02
Dashboard /wp-admin2,197 ▲175.55 ▲0.0285.70 ▼0.3938.77 ▲0.14
Posts /wp-admin/edit.php2,105 ▲52.02 ▲0.0333.87 ▼3.7034.95 ▼2.42
Add New Post /wp-admin/post-new.php1,531 ▼423.21 ▲4.78665.92 ▲53.7151.17 ▼8.89
Media Library /wp-admin/upload.php1,402 ▲24.23 ▲0.00108.86 ▲8.5047.72 ▲2.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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 issues were found

Optimizations

Plugin configuration 90% from 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
3 plugin tags: discount, woocommerce, coupons

woocommerce-auto-added-coupons/woocommerce-jos-autocoupon.php 77% from 13 tests

"WooCommerce Extended Coupon Features FREE" version 3.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-auto-added-coupons.php" instead of "woocommerce-jos-autocoupon.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin9,678 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PO File81,2691,5583,803
PHP187801,4363,392
HTML7390161,125
JavaScript1078105516
SVG100399
CSS55188260
JSON210156
XML10023
Mustache1004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity30.05
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods286
▷ Static methods196.64%
▷ Public methods21876.22%
▷ Protected methods289.79%
▷ Private methods4013.99%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants15
▷ Global constants16.67%
▷ Class constants1493.33%
▷ Public constants14100.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
8 PNG files occupy 0.25MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/img/be_tab_checkout.png27.18KB14.32KB▼ 47.32%
docs/img/be_tab_extended_features.png21.32KB10.59KB▼ 50.33%
docs/img/be_tab_usage_restriction.png38.64KB23.89KB▼ 38.18%
docs/img/be_tab_misc_auto_coupon.png16.11KB10.81KB▼ 32.90%
docs/img/be_settings_licence.png29.82KB11.86KB▼ 60.24%