10% email-before-download

Code Review | Email Before Download

WordPress plugin Email Before Download scored10%from 54 tests.

About plugin

  • Plugin page: email-before-down...
  • Plugin version: 6.9.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 27, 2011
  • Latest release: Dec 28, 2022
  • Number of updates: 146
  • Update frequency: every 29.8 days
  • Top authors: mandsconsulting (63.7%)ashokaggarwal (36.99%)

Code review

54 tests

User reviews

43 reviews

Install metrics

10,000+ active /341,932 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/email-before-download/includes/class-email-before-download-activator.php+28
    missing dependencies

Server metrics [RAM: ▲0.38MB] [CPU: ▼3.57ms] Passed 4 tests

This is a short check of server-side resources used by Email Before Download
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3846.23 ▼1.36
Dashboard /wp-admin3.73 ▲0.4252.60 ▲1.79
Posts /wp-admin/edit.php3.78 ▲0.4256.56 ▲1.91
Add New Post /wp-admin/post-new.php6.25 ▲0.3687.68 ▼16.60
Media Library /wp-admin/upload.php3.59 ▲0.3640.79 ▲3.78
Email Before Download Logs /wp-admin/admin.php?page=email-before-download-logs3.5643.88
Options /wp-admin/admin.php?page=email-before-download3.5642.35
Email Before Download Links /wp-admin/admin.php?page=email-before-download-links3.5638.99

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: 3 new tables, 6 new options
New tables
wp_ebd_item
wp_ebd_link
wp_ebd_posted_data
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Email Before Download: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19713.43 ▼0.929.35 ▲7.2443.03 ▲1.11
Dashboard /wp-admin2,256 ▲765.67 ▲0.0786.07 ▼5.4037.98 ▼7.31
Posts /wp-admin/edit.php2,158 ▲582.02 ▲0.0436.16 ▼2.8234.06 ▼6.89
Add New Post /wp-admin/post-new.php1,550 ▲2223.15 ▼0.00621.83 ▼39.8346.14 ▼22.29
Media Library /wp-admin/upload.php1,458 ▲614.32 ▲0.13100.68 ▼4.2143.99 ▼0.32
Email Before Download Logs /wp-admin/admin.php?page=email-before-download-logs1,0132.0131.0630.09
Options /wp-admin/admin.php?page=email-before-download1,3332.0426.5534.74
Email Before Download Links /wp-admin/admin.php?page=email-before-download-links1,0552.1627.1430.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_ebd_link
    • wp_ebd_posted_data
    • wp_ebd_item
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/screen.php): failed to open stream: No such file or directory in wp-content/plugins/email-before-download/admin/class-email-before-download-table.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/email-before-download/admin/class-email-before-download-table.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/email-before-download/admin/partials/email-before-download-admin-table.php:23
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/email-before-download/admin/class-email-before-download-table.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-before-download/admin/partials/email-before-download-admin-display.php:17

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 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires at least: Invalid version format
  • Plugin Name: Please specify the plugin name on the first line ( === email-before-download === )
The official readme.txt might help

email-before-download/email-before-download.php 85% from 13 tests

This is the main PHP file of "Email Before Download" version 6.9.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,723 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP172532241,642
JavaScript12040
CSS21435
SVG1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.08
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods112
▷ Static methods10.89%
▷ Public methods9181.25%
▷ Protected methods00.00%
▷ Private methods2118.75%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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