63% email-to-download

Code Review | Email to Download

WordPress plugin Email to Download scored 63% from 54 tests.

About plugin

  • Plugin page: email-to-download
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4.2
  • WordPress version: 6.3.1
  • First release: Sep 25, 2015
  • Latest release: Jun 16, 2020
  • Number of updates: 28
  • Update frequency: every 61.6 days
  • Top authors: duogeek (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active / 16,759 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.17MB] [CPU: ▼10.84ms] Passed 4 tests

Server-side resources used by Email to Download
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1051.99 ▲7.66
Dashboard /wp-admin3.38 ▲0.0753.02 ▼12.10
Posts /wp-admin/edit.php3.49 ▲0.1361.17 ▲1.38
Add New Post /wp-admin/post-new.php4.96 ▼0.9362.74 ▼36.78
Media Library /wp-admin/upload.php3.30 ▲0.0741.76 ▲4.13
All Downloads /wp-admin/edit.php?post_type=ed_download3.3544.57
Help /wp-admin/edit.php?post_type=ed_download&page=etd-help3.2534.51
Add New /wp-admin/post-new.php?post_type=ed_download4.9258.93
Subscribers /wp-admin/edit.php?post_type=ed_download&page=email-to-download-subscribers3.3336.63
Settings /wp-admin/edit.php?post_type=ed_download&page=email-to-download-settings3.3438.96

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: 35 new files
Database: 1 new table, 6 new options
New tables
wp_etd_manager
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Email to Download
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,026 ▲22613.71 ▼0.7610.63 ▲8.5444.57 ▲1.15
Dashboard /wp-admin2,277 ▲715.90 ▲1.0499.28 ▼10.7245.00 ▲1.96
Posts /wp-admin/edit.php2,171 ▲822.12 ▲0.1138.30 ▲1.6134.75 ▲3.04
Add New Post /wp-admin/post-new.php6,474 ▲4,96020.58 ▲3.021,018.08 ▲359.8576.82 ▲23.39
Media Library /wp-admin/upload.php1,470 ▲824.31 ▲0.0899.32 ▼13.9442.49 ▼3.79
All Downloads /wp-admin/edit.php?post_type=ed_download1,1322.0436.7433.23
Help /wp-admin/edit.php?post_type=ed_download&page=etd-help9291.8326.7129.00
Add New /wp-admin/post-new.php?post_type=ed_download1,55216.721,196.7234.96
Subscribers /wp-admin/edit.php?post_type=ed_download&page=email-to-download-subscribers8591.9030.8727.49
Settings /wp-admin/edit.php?post_type=ed_download&page=email-to-download-settings9902.0226.6427.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_etd_manager
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=ed_download&page=etd-help
    • > Notice in wp-content/plugins/email-to-download/app/controllers/help_controller.php+37
    Undefined variable: data
    • > GET request to /wp-admin/edit.php?post_type=ed_download&page=etd-help
    • > Warning in wp-content/plugins/email-to-download/app/lib/dg-builder/builder_controller.php+36
    extract() expects parameter 1 to be array, null given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ed_download
    • > User deprecated in wp-includes/functions.php+5828
    Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/email-to-download/app/lib/dg-builder/builder_form.php
    • > /wp-content/plugins/email-to-download/app/lib/dg-builder/builder_options.php
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/email-to-download/app/views/shortcodes/popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/email-to-download/app/views/shortcodes/normal.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/email-to-download/app/views/shortcodes/slide.php:2
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/email-to-download/app/views/shortcodes/normal.php on line 5
    • > PHP Notice
      Trying to get property 'post_content' of non-object in wp-content/plugins/email-to-download/app/views/shortcodes/normal.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Builder_Controller' not found in wp-content/plugins/email-to-download/app/controllers/shortcodes_controller.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Builder_Controller' not found in wp-content/plugins/email-to-download/app/controllers/settings_controller.php:5
    • > PHP Notice
      Undefined variable: tagline in wp-content/plugins/email-to-download/app/views/shortcodes/normal.php on line 14
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/email-to-download/app/views/shortcodes/normal.php on line 3
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/email-to-download/app/views/shortcodes/normal.php on line 7

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: email, download, email to download, get email before download, email before download

email-to-download/email-to-download.php Passed 13 tests

The main file in "Email to Download" v. 3.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
A plugin that helps you to collect email before download

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 plugin1,892 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP19353881,606
CSS52616147
JavaScript46017139

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.91
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods93
▷ Static methods1718.28%
▷ Public methods8187.10%
▷ Protected methods22.15%
▷ Private methods1010.75%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants847.06%
▷ Class constants952.94%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/assets/colorbox/images/controls.png1.23KB1.28KB0.00%
app/assets/colorbox/images/loading_background.png0.13KB0.15KB0.00%
app/assets/colorbox/images/overlay.png0.11KB0.15KB0.00%
app/assets/colorbox/images/border.png0.07KB0.10KB0.00%