72% download-plugin

Code Review | Download Plugin

WordPress plugin Download Plugin scored72%from 54 tests.

About plugin

  • Plugin page: download-plugin
  • Plugin version: 2.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Oct 25, 2023
  • Number of updates: 78
  • Update frequency: every 35.8 days
  • Top authors: metagauss (57.69%)cmshelplive (20.51%)IndiaSan (17.95%)profilegrid0 (5.13%)profilegrid (3.85%)

Code review

54 tests

User reviews

17 reviews

Install metrics

20,000+ active /376,402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.80ms] Passed 4 tests

Analyzing server-side resources used by Download Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.33 ▼3.30
Dashboard /wp-admin3.60 ▲0.3045.97 ▼5.01
Posts /wp-admin/edit.php3.65 ▲0.3047.33 ▲2.71
Add New Post /wp-admin/post-new.php6.14 ▲0.2583.18 ▼5.60
Media Library /wp-admin/upload.php3.46 ▲0.2338.09 ▲6.33
Dpwap Activate /wp-admin/admin.php?page=dpwap-activate3.5634.59
Dpwap Plugin Download /wp-admin/admin.php?page=dpwap_plugin_download3.4135.40
Multiple Upload /wp-admin/admin.php?page=mul_upload3.5633.87
Dpwap Status /wp-admin/admin.php?page=activate-status3.5635.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Download Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.74 ▲0.121.96 ▲0.2739.97 ▼4.36
Dashboard /wp-admin2,217 ▲365.56 ▼0.1684.78 ▼21.8039.01 ▼0.20
Posts /wp-admin/edit.php2,125 ▲282.02 ▲0.0435.57 ▼0.0235.39 ▲1.14
Add New Post /wp-admin/post-new.php1,546 ▲2023.08 ▼0.49690.11 ▼16.7357.83 ▲0.26
Media Library /wp-admin/upload.php1,422 ▲224.28 ▲0.07102.75 ▲7.0144.59 ▲2.01
Dpwap Activate /wp-admin/admin.php?page=dpwap-activate8092.0629.3625.42
Dpwap Plugin Download /wp-admin/admin.php?page=dpwap_plugin_download7801.6725.8720.71
Multiple Upload /wp-admin/admin.php?page=mul_upload8901.7227.9828.41
Dpwap Status /wp-admin/admin.php?page=activate-status8062.0926.8021.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=dpwap-activate
    • > Warning in wp-content/plugins/download-plugin/app/Plugins/Base.php+80
    include_once(wp-content/plugins/download-plugin/app/Plugins/templates/feature-package.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=dpwap-activate
    • > Warning in wp-content/plugins/download-plugin/app/Plugins/Base.php+80
    include_once(): Failed opening 'wp-content/plugins/download-plugin/app/Plugins/templates/feature-package.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=dpwap_plugin_download
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'DPWAP\Plugins\Base' does not have a method 'dpwap_plugin_download_func'

SRP 0% 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/download-plugin/app/Users/templates/dpwap_users_info.php
    • > /wp-content/plugins/download-plugin/app/bbPress/templates/dpwap_bbpress_info.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/download-plugin/app/Plugins/templates/dpwap_plugin_info.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/download-plugin/app/Plugins/templates/multiple_upload_plugin.php:7
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/bbPress/templates/dpwap_bbpress_info.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/download-plugin/app/Themes/templates/dpwap_theme_info.php:3
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/bbPress/templates/dpwap_bbpress_info.php on line 40
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/bbPress/templates/dpwap_bbpress_info.php on line 22
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/bbPress/templates/dpwap_bbpress_info.php on line 18
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/bbPress/templates/dpwap_bbpress_info.php on line 44
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/Users/templates/dpwap_users_info.php on line 18
    • > PHP Warning
      Use of undefined constant DPWAP_URL - assumed 'DPWAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/download-plugin/app/Users/templates/dpwap_users_info.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: A description for screenshot #2 is missing in download-plugin/assets to your readme.txt
Please take inspiration from this readme.txt

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

The main file in "Download Plugin" v. 2.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("2.7" instead of "4.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,166 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP223122881,713
CSS418514951
JavaScript52429304
PO File16982174
JSON20024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity28.62
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods82
▷ Static methods1619.51%
▷ Public methods7996.34%
▷ Protected methods00.00%
▷ Private methods33.66%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 1.78MB with 1.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-metagauss-theme.png4.66KB2.59KB▼ 44.47%
assets/images/dp-step-1.png20.19KB7.18KB▼ 64.42%
assets/images/multi-upload.png236.62KB74.43KB▼ 68.54%
assets/images/dp-step-3.png18.99KB8.21KB▼ 56.77%
assets/images/icon-registration-magic.png102.41KB36.16KB▼ 64.70%