72% email-download-link

Code Review | Email download link

WordPress plugin Email download link scored 72% from 54 tests.

About plugin

  • Plugin page: email-download-link
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Mar 16, 2016
  • Latest release: Oct 1, 2021
  • Number of updates: 38
  • Update frequency: every 53.3 days
  • Top authors: gopi_plus (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

5,000+ active / 69,466 total downloads

Benchmarks

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

Server-side resources used by Email download link
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.22 ▲0.5038.56 ▲8.81
Dashboard /wp-admin3.52 ▲0.4649.79 ▲6.17
Posts /wp-admin/edit.php3.56 ▲0.4645.87 ▲4.24
Add New Post /wp-admin/post-new.php5.81 ▲0.3894.82 ▼561.36
Media Library /wp-admin/upload.php3.40 ▲0.3934.15 ▲4.25
Security /wp-admin/admin.php?page=ed-security3.4131.22
Downloads /wp-admin/admin.php?page=ed-downloads3.4133.33
Settings /wp-admin/admin.php?page=ed-settings3.4234.42
History /wp-admin/admin.php?page=ed-downloadhistory3.4130.56

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 71 new files
Database: 4 new tables, 2 new options
New tables
wp_ed_emaillist
wp_ed_downloadform
wp_ed_filter
wp_ed_pluginconfig
New WordPress options
email-download-link
widget_email-download-link

Browser metrics Passed 4 tests

A check of browser resources used by Email download link
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,853 ▲25716.18 ▲0.6113.55 ▲5.2951.05 ▲4.99
Dashboard /wp-admin2,998 ▲675.82 ▼0.11139.20 ▼10.40121.14 ▲13.77
Posts /wp-admin/edit.php2,792 ▲562.68 ▼0.0163.68 ▼4.2193.05 ▲1.20
Add New Post /wp-admin/post-new.php1,697 ▲8218.92 ▼2.59398.42 ▲134.84105.99 ▼5.13
Media Library /wp-admin/upload.php1,786 ▼245.02 ▼0.04134.14 ▼11.68146.11 ▲35.41
Security /wp-admin/admin.php?page=ed-security1,5152.2557.8074.57
Downloads /wp-admin/admin.php?page=ed-downloads1,4202.0851.7273.56
Settings /wp-admin/admin.php?page=ed-settings1,3732.2457.0675.67
History /wp-admin/admin.php?page=ed-downloadhistory1,2412.2952.2277.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_email-download-link

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=ed-security
    • > Notice in wp-content/plugins/email-download-link/classes/ed-common.php+103
    Undefined index: HTTP_CLIENT_IP
    • > GET request to /wp-admin/admin.php?page=ed-security
    • > Notice in wp-content/plugins/email-download-link/classes/ed-common.php+104
    Undefined index: HTTP_X_FORWARDED_FOR

SRP 0% 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
Please fix the following items
  • 37× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/email-download-link/security/recaptcha-add.php
    • > /wp-content/plugins/email-download-link/downloads/downloads-add.php
    • > /wp-content/plugins/email-download-link/settings/settings-general.php
    • > /wp-content/plugins/email-download-link/classes/ed-shortcode.php
    • > /wp-content/plugins/email-download-link/job/ed-download.php
    • > /wp-content/plugins/email-download-link/query/db_subscribers.php
    • > /wp-content/plugins/email-download-link/subscribers/subscribers-export.php
    • > /wp-content/plugins/email-download-link/query/db_downloads.php
    • > /wp-content/plugins/email-download-link/query/db_filter.php
    • > /wp-content/plugins/email-download-link/settings/settings.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/email-download-link/base/ed-defined.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

email-download-link/email-download-link.php 92% from 13 tests

Analyzing the main PHP file in "Email download link" version 3.4
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 256 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,250 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP405581335,517
PO File36109061,536
JavaScript5253196
HTML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity20.50
▷ Minimum class complexity2.00
▷ Maximum class complexity46.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods92
▷ Static methods8592.39%
▷ Public methods92100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mail.png0.42KB0.36KB▼ 15.31%
images/icon.png0.62KB0.75KB0.00%
images/download.png0.62KB0.75KB0.00%
sample/sample.png4.97KB2.85KB▼ 42.58%