84% edd-coupon-counter

Code Review | Coupon Counter for EDD

WordPress plugin Coupon Counter for EDD scored84%from 54 tests.

About plugin

  • Plugin page: edd-coupon-counter
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: May 4, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 23
  • Update frequency: every 56.7 days
  • Top authors: davidvongries (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.89ms] Passed 4 tests

Analyzing server-side resources used by Coupon Counter for EDD
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.33 ▼2.50
Dashboard /wp-admin3.31 ▼0.0347.35 ▼14.01
Posts /wp-admin/edit.php3.36 ▲0.0147.47 ▲3.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.46 ▼8.05
Media Library /wp-admin/upload.php3.24 ▲0.0131.89 ▲0.99

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Coupon Counter for EDD
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.20 ▼0.531.71 ▲0.0140.29 ▼1.99
Dashboard /wp-admin2,198 ▲175.65 ▼0.0197.13 ▼14.4441.01 ▼5.40
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0238.16 ▼1.3135.35 ▼2.25
Add New Post /wp-admin/post-new.php1,526 ▼022.90 ▼0.31580.25 ▼113.5546.72 ▼5.02
Media Library /wp-admin/upload.php1,400 ▲64.18 ▼0.0094.18 ▼4.4741.50 ▼3.30

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
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/edd-coupon-counter/edd-coupon-counter.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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: edd counter, easy digital downloads, edd discounts, counter, edd countdown...

edd-coupon-counter/edd-coupon-counter.php Passed 13 tests

The principal PHP file in "Coupon Counter for EDD" v. 1.0.3 is loaded by WordPress automatically on each request
84 characters long description:
Easily display the remaining or used coupon codes with Easy Digital Downloads (EDD).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162839

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin