84% subscriber-discounts-for-easy-digital-downloads

Code Review | Subscriber Discounts for Easy Digital Downloads

WordPress plugin Subscriber Discounts for Easy Digital Downloads scored 84% from 54 tests.

About plugin

  • Plugin page: subscriber-discou...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2017
  • Latest release: Apr 4, 2023
  • Number of updates: 16
  • Update frequency: every 142.0 days
  • Top authors: scott.deluzio (93.75%)ampmode (12.5%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.10ms] Passed 4 tests

Server-side resources used by Subscriber Discounts for Easy Digital Downloads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.27 ▼4.99
Dashboard /wp-admin3.37 ▲0.0745.60 ▼3.48
Posts /wp-admin/edit.php3.49 ▲0.1349.77 ▲4.85
Add New Post /wp-admin/post-new.php5.95 ▲0.0793.88 ▲3.92
Media Library /wp-admin/upload.php3.30 ▲0.0736.69 ▲4.16
Subscriber Discounts /wp-admin/edit.php?post_type=download&page=subscriber-discounts-edd3.0623.27

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Subscriber Discounts for Easy Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.39 ▼1.254.40 ▲2.6742.73 ▼4.52
Dashboard /wp-admin2,210 ▲194.85 ▼0.06101.52 ▼2.7338.88 ▼3.11
Posts /wp-admin/edit.php2,095 ▲92.04 ▲0.0541.65 ▲6.6537.37 ▲3.31
Add New Post /wp-admin/post-new.php1,543 ▲123.50 ▲5.25593.41 ▼13.5447.64 ▼2.57
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0395.21 ▼48.4041.46 ▼13.22
Subscriber Discounts /wp-admin/edit.php?post_type=download&page=subscriber-discounts-edd280.440.103.84

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=download&page=subscriber-discounts-edd
    • > Network (severe)
    wp-admin/edit.php?post_type=download&page=subscriber-discounts-edd - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: mailchimp, easy digital downloads, discounts, activecampaign

subscriber-discounts-for-easy-digital-downloads/subscriber-discounts-for-easy-digital-downloads.php 92% from 13 tests

The entry point to "Subscriber Discounts for Easy Digital Downloads" version 1.1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin391 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP740143391

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.75
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
There were not PNG files found in your plugin