83% advance-coupons-for-woocommerce

Code Review | Advance Coupons for Woocommerce

WordPress plugin Advance Coupons for Woocommerce scored 83% from 54 tests.

About plugin

  • Plugin page: advance-coupons-f...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.8
  • WordPress version: 5.9.2
  • First release: Jun 26, 2021
  • Latest release: Mar 9, 2022
  • Number of updates: 5
  • Update frequency: every 51.2 days
  • Top authors: istiaqnirab (60%)ok9xnirab (40%)springdevs (40%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 264 total downloads


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.05MB] [CPU: ▼293.78ms] Passed 4 tests

A check of server-side resources used by Advance Coupons for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1458.20 ▲6.37
Dashboard /wp-admin3.49 ▲0.0834.10 ▼0.02
Posts /wp-admin/edit.php3.72 ▲0.0840.43 ▲1.75
Add New Post /wp-admin/post-new.php6.96 ▼0.0295.19 ▼1,176.22
Media Library /wp-admin/upload.php3.37 ▲0.0725.28 ▼0.63

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Advance Coupons for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,796 ▲4215.89 ▼0.045.80 ▼0.062.11 ▼0.55
Dashboard /wp-admin2,928 ▲746.06 ▼0.17119.25 ▼19.17167.13 ▲3.45
Posts /wp-admin/edit.php2,719 ▲253.24 ▲0.0265.81 ▲3.29157.45 ▲14.80
Add New Post /wp-admin/post-new.php1,708 ▼4420.89 ▼0.60435.16 ▼60.95163.89 ▲9.02
Media Library /wp-admin/upload.php1,731 ▲335.45 ▼0.04139.45 ▼2.13200.39 ▲10.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 4 options
    • sdwac_multi
    • sdwac_first_time_purchase_coupon
    • sdwac_show_product_discount
    • sdwac_url

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advance-coupons-for-woocommerce/includes/Admin/views/plugin-notice.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 86% 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:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

advance-coupons-for-woocommerce/coupons.php 77% from 13 tests

The main PHP script in "Advance Coupons for Woocommerce" version 1.0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advance-coupons-for-woocommerce.php" instead of "coupons.php")

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
Good job! No executable or dangerous file extensions detected1,975 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity13.30
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes14.55%
▷ Static methods1512.50%
▷ Public methods11696.67%
▷ Protected methods00.00%
▷ Private methods43.33%
▷ Named functions350.00%
▷ Anonymous functions350.00%
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin