90% edd-discount-emails

Code Review | EDD Discount Emails

WordPress plugin EDD Discount Emails scored90%from 54 tests.

About plugin

  • Plugin page: edd-discount-emails
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 30, 2016
  • Latest release: Dec 9, 2018
  • Number of updates: 9
  • Update frequency: every 109.5 days
  • Top authors: EngageWP (77.78%)renventura (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,059 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by EDD Discount Emails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.63 ▼1.51
Dashboard /wp-admin3.31 ▲0.0043.72 ▼3.97
Posts /wp-admin/edit.php3.36 ▲0.0049.01 ▼0.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.55 ▲2.59
Media Library /wp-admin/upload.php3.23 ▲0.0035.70 ▲1.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EDD Discount Emails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.17 ▼1.121.63 ▼0.4046.55 ▲6.04
Dashboard /wp-admin2,206 ▲154.84 ▼0.03109.59 ▲3.5944.06 ▲3.30
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0840.11 ▲2.6935.86 ▲0.05
Add New Post /wp-admin/post-new.php1,538 ▲1923.23 ▲0.05643.84 ▼37.3755.59 ▲0.50
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.00103.55 ▼8.3543.44 ▼5.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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 | 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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: easy digital downloads, discounts, coupons

edd-discount-emails/edd-discount-emails.php Passed 13 tests

"EDD Discount Emails" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
63 characters long description:
Set a list of emails to limit the usability of a discount code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin120 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15781104
Markdown111016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin