68% wp-dispatcher

Code Review | WP Dispatcher - Secure Download Links

WordPress plugin WP Dispatcher - Secure Download Links scored68%from 54 tests.

About plugin

  • Plugin page: wp-dispatcher
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 23, 2020
  • Latest release: Apr 13, 2021
  • Number of updates: 17
  • Update frequency: every 11.8 days
  • Top authors: ekndev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /941 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.98ms] Passed 4 tests

A check of server-side resources used by WP Dispatcher - Secure Download Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.45 ▼1.28
Dashboard /wp-admin3.34 ▲0.0447.67 ▼7.59
Posts /wp-admin/edit.php3.46 ▲0.1049.88 ▼2.48
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.89 ▼8.57
Media Library /wp-admin/upload.php3.27 ▲0.0437.70 ▲2.96
Add New /wp-admin/admin.php?page=wp_dispatcher_new3.2331.96
WP Dispatcher /wp-admin/admin.php?page=wp_dispatcher3.2443.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: 2 new tables, 9 new options
New tables
wp_dispatcher_uploads
wp_dispatcher_links
New WordPress options
wp_dispatcher_links_db_version
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
wp_dispatcher_options
widget_recent-comments
wp_dispatcher_uploads_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for WP Dispatcher - Secure Download Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16313.44 ▼1.118.03 ▲6.1841.05 ▼3.87
Dashboard /wp-admin2,225 ▲485.58 ▲0.0092.74 ▼9.3637.81 ▼5.24
Posts /wp-admin/edit.php2,127 ▲302.02 ▲0.0437.72 ▼3.0339.19 ▼0.83
Add New Post /wp-admin/post-new.php1,549 ▲2323.33 ▼0.12679.82 ▲40.0557.28 ▼2.63
Media Library /wp-admin/upload.php1,427 ▲304.14 ▼0.06101.80 ▼49.5142.11 ▼29.59
Add New /wp-admin/admin.php?page=wp_dispatcher_new8172.0224.1734.36
WP Dispatcher /wp-admin/admin.php?page=wp_dispatcher9402.0124.2227.27

Uninstaller [IO: ▲0.00MB] [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
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_dispatcher_uploads
    • wp_dispatcher_links
  • Zombie WordPress options detected upon uninstall: 9 options
    • wp_dispatcher_links_db_version
    • db_upgraded
    • widget_recent-comments
    • wp_dispatcher_options
    • widget_recent-posts
    • wp_dispatcher_uploads_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-dispatcher/public/partials/wp-dispatcher-public-display.php
    • > /wp-content/plugins/wp-dispatcher/admin/partials/wp-dispatcher-admin-display.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-dispatcher/admin/class-links-list-table.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-dispatcher/admin/class-uploads-list-table.php:5

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 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
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-dispatcher === )
  • Donate link: Invalid URI found ("ekn.dev")
The official readme.txt might help

wp-dispatcher/wp-dispatcher.php Passed 13 tests

The main file in "WP Dispatcher - Secure Download Links" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
Generate secure download links dynamically from your uploads

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,579 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP205851,5751,564
CSS2589
JavaScript24546

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.33
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods109
▷ Static methods21.83%
▷ Public methods8275.23%
▷ Protected methods2119.27%
▷ Private methods65.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin