68% download-sender

Code Review | Download Sender

WordPress plugin Download Sender scored68%from 54 tests.

About plugin

  • Plugin page: download-sender
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Apr 5, 2019
  • Latest release: Dec 10, 2019
  • Number of updates: 93
  • Update frequency: every 2.7 days
  • Top authors: wpemaker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,508 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.72MB] [CPU: ▲1.10ms] Passed 4 tests

A check of server-side resources used by Download Sender
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3441.52 ▼3.00
Dashboard /wp-admin4.21 ▲0.9151.66 ▲6.74
Posts /wp-admin/edit.php4.26 ▲0.9057.29 ▲8.74
Add New Post /wp-admin/post-new.php6.72 ▲0.8389.22 ▼8.07
Media Library /wp-admin/upload.php4.04 ▲0.8145.01 ▲12.76
Logs /wp-admin/admin.php?page=downloadsender-logs3.9934.32
Settings /wp-admin/admin.php?page=downloadsender-settings4.0436.49
Admin Functions /wp-admin/admin.php?page=downloadsender-admin4.0134.83

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 54 new files
Database: 2 new tables, 7 new options
New tables
wp_download_sender_encrypted_links
wp_download_sender_logs
New WordPress options
recovery_mode_email_last_sent
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Download Sender: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,200 ▲46516.34 ▲1.976.80 ▲4.9448.86 ▼0.89
Dashboard /wp-admin2,471 ▲2807.10 ▲1.19134.76 ▲35.78109.91 ▲64.72
Posts /wp-admin/edit.php2,387 ▲2983.69 ▲1.7255.84 ▲15.8979.39 ▲44.30
Add New Post /wp-admin/post-new.php1,754 ▲22023.25 ▲0.25575.64 ▼85.6946.29 ▼14.57
Media Library /wp-admin/upload.php1,542 ▲1604.96 ▲0.7690.58 ▼9.3097.55 ▲51.38
Logs /wp-admin/admin.php?page=downloadsender-logs2671.9817.650.10
Settings /wp-admin/admin.php?page=downloadsender-settings8731.9520.7936.82
Admin Functions /wp-admin/admin.php?page=downloadsender-admin9011.9819.9637.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_download_sender_encrypted_links
    • wp_download_sender_logs
  • This plugin does not fully uninstall, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=downloadsender-logs
    • > Error in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+685
    Uncaught Error: Call to undefined method DownloadSender\Form::dropdown() in wp-content/plugins/download-sender/includes/admin/class-html-elements.php:685
    Stack trace:
    #0 wp-content/plugins/download-sender/includes/admin/class-settings-page.php(199): DownloadSender\Form->render()
    #1 wp-includes/class-wp-hook.php(310): DownloadSender_Settings->logs_page_modals()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin-header.php(163): do_action()
    #5 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #6 {main}
    thrown
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+307
    Undefined variable: id
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+306
    Undefined variable: name
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+306
    Undefined variable: value
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+506
    Undefined variable: current
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+506
    Undefined variable: target
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+308
    Undefined variable: description
    • > GET request to /wp-admin/admin.php?page=downloadsender-settings
    • > Error in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+685
    Uncaught Error: Call to undefined method DownloadSender\Form::checkbox() in wp-content/plugins/download-sender/includes/admin/class-html-elements.php:685
    Stack trace:
    #0 wp-content/plugins/download-sender/includes/admin/class-settings-page.php(939): DownloadSender\Form->render()
    #1 wp-admin/includes/template.php(1824): DownloadSender_Settings->settings_tabs()
    #2 wp-admin/includes/template.php(1778): do_settings_fields()
    #3 wp-content/plugins/download-sender/includes/admin/class-settings-page.php(303): do_settings_sections()
    #4 wp-includes/class-wp-hook.php(310): DownloadSender_Settings::settings_page()
    #5 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #6 wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 wp-admin/admin.php(259): do_action()
    #8 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+506
    Undefined variable: chosen
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+506
    Undefined variable: icon_picker
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+506
    Undefined variable: data_fa_icon
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+506
    Undefined variable: hide_target
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+507
    Undefined index: value
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Warning in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+507
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Notice in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+532
    Undefined variable: desc_style
    • > GET request to /wp-admin/admin.php?page=downloadsender-admin
    • > Error in wp-content/plugins/download-sender/includes/admin/class-html-elements.php+685
    Uncaught Error: Call to undefined method DownloadSender\Form::dropdown() in wp-content/plugins/download-sender/includes/admin/class-html-elements.php:685
    Stack trace:
    #0 wp-content/plugins/download-sender/includes/admin/class-settings-page.php(1238): DownloadSender\Form->render()
    #1 wp-content/plugins/download-sender/includes/admin/class-settings-page.php(955): DownloadSender_Settings::admin_tabs()
    #2 wp-includes/class-wp-hook.php(310): DownloadSender_Settings::admin_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/download-sender/includes/admin/class-logs-page.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/download-sender/includes/admin/class-logs-page.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-sender/includes/admin/class-logs-page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/download-sender/includes/core-functions.php:152

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: A description for screenshot #4 is missing in download-sender/assets to your readme.txt
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

download-sender/download-sender.php 92% from 13 tests

The entry point to "Download Sender" version 1.3.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 169 characters long)

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
No dangerous file extensions were detected9,521 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP147428325,313
CSS9299892,356
JavaScript11193971,167
SVG100685

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.42
▷ Minimum class complexity2.00
▷ Maximum class complexity142.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods109
▷ Static methods3834.86%
▷ Public methods9688.07%
▷ Protected methods00.00%
▷ Private methods1311.93%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.17MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/downloadsender-vc.png0.39KB0.40KB0.00%
assets/lib/flag-sprites/flags.png148.90KB50.92KB▼ 65.80%
assets/images/logs-email_verify-icons-sprites.png17.85KB1.46KB▼ 91.80%
assets/images/downloadsender-blue.png0.33KB0.33KB0.00%
assets/images/downloadsender-light.png0.33KB0.33KB0.00%