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.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.8.1
  • First release: Mar 16, 2016
  • Latest release: Dec 4, 2021
  • Number of updates: 39
  • Update frequency: every 53.6 days
  • Top authors: gopi_plus (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

5,000+ active / 74,080 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.41MB] [CPU: ▼144.21ms] 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.23 ▲0.3933.23 ▲9.16
Dashboard /wp-admin3.52 ▲0.4538.89 ▼5.30
Posts /wp-admin/edit.php3.57 ▲0.4636.04 ▲0.34
Add New Post /wp-admin/post-new.php5.82 ▲0.3877.82 ▼575.74
Media Library /wp-admin/upload.php3.40 ▲0.4027.71 ▲3.86
Security /wp-admin/admin.php?page=ed-security3.4225.46
History /wp-admin/admin.php?page=ed-downloadhistory3.4128.03
Settings /wp-admin/admin.php?page=ed-settings3.4228.55
Downloads /wp-admin/admin.php?page=ed-downloads3.4227.94

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_pluginconfig
wp_ed_emaillist
wp_ed_filter
wp_ed_downloadform
New WordPress options
widget_email-download-link
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,865 ▲23915.91 ▼0.119.96 ▲3.1073.92 ▼1.65
Dashboard /wp-admin2,970 ▲755.97 ▼0.20114.79 ▼21.44197.05 ▲19.62
Posts /wp-admin/edit.php2,782 ▲393.11 ▼0.1165.73 ▼0.19138.63 ▲2.55
Add New Post /wp-admin/post-new.php2,118 ▼1,62516.14 ▼3.17397.66 ▼15.89189.55 ▲28.44
Media Library /wp-admin/upload.php1,788 ▲335.56 ▲0.02125.39 ▼18.08194.22 ▲1.28
Security /wp-admin/admin.php?page=ed-security1,5482.4252.81127.58
History /wp-admin/admin.php?page=ed-downloadhistory1,2462.4155.67113.12
Settings /wp-admin/admin.php?page=ed-settings1,3802.4055.33123.89
Downloads /wp-admin/admin.php?page=ed-downloads1,4222.4152.64112.81

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/query/db_default.php
    • > /wp-content/plugins/email-download-link/settings/settings-downloadmail.php
    • > /wp-content/plugins/email-download-link/settings/settings-edit.php
    • > /wp-content/plugins/email-download-link/subscribers/subscribers-downloads.php
    • > /wp-content/plugins/email-download-link/downloads/downloads-add.php
    • > /wp-content/plugins/email-download-link/classes/ed-sendemail.php
    • > /wp-content/plugins/email-download-link/classes/ed-register.php
    • > /wp-content/plugins/email-download-link/settings/settings-sample.php
    • > /wp-content/plugins/email-download-link/job/ed-export.php
    • > /wp-content/plugins/email-download-link/subscribers/subscribers-email.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.5
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,271 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP405581335,538
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.32
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/download.png0.62KB0.75KB0.00%
sample/sample.png4.97KB2.85KB▼ 42.58%
images/mail.png0.42KB0.36KB▼ 15.31%
images/icon.png0.62KB0.75KB0.00%