77% download-manager-ms

Code Review | Download Manager MS

WordPress plugin Download Manager MS scored77%from 54 tests.

About plugin

  • Plugin page: download-manager-ms
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.5.0
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Dec 9, 2012
  • Number of updates: 11
  • Update frequency: every 2.3 days
  • Top authors: bquade (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,928 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.40MB] [CPU: ▼4.04ms] 75% from 4 tests

Analyzing server-side resources used by Download Manager MS
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 537.93ms on /wp-admin/admin.php?page=bq-download-menu-help)
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4437.41 ▼6.60
Dashboard /wp-admin3.74 ▲0.4047.98 ▼9.13
Posts /wp-admin/edit.php3.79 ▲0.4446.34 ▼1.80
Add New Post /wp-admin/post-new.php6.28 ▲0.4096.84 ▲1.38
Media Library /wp-admin/upload.php3.60 ▲0.3837.16 ▲3.94
File Stats /wp-admin/admin.php?page=bq-download-menu-files3.5635.34
Downloads /wp-admin/admin.php?page=bq-download-menu3.6133.74
Help /wp-admin/admin.php?page=bq-download-menu-help3.71537.93
About /wp-admin/admin.php?page=bq-download-menu-about3.6136.41
Email Stats /wp-admin/admin.php?page=bq-download-menu-email3.6343.56

Server storage [IO: ▲0.77MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/download-manager-ms/" and "wp-content/uploads/"
    • (new file) bq-download-files-tTeP-86uO/.empty
Filesystem: 44 new files
Database: 3 new tables, 9 new options
New tables
bq_download_file
bq_download
bq_download_user
New WordPress options
db_upgraded
bq_download_dir
widget_recent-posts
bq_download_db_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
bq_download_return_email
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Download Manager MS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲11014.75 ▲0.481.86 ▼0.2040.12 ▼3.21
Dashboard /wp-admin2,252 ▲645.79 ▼0.09101.04 ▼20.9739.67 ▼6.37
Posts /wp-admin/edit.php2,135 ▲462.02 ▲0.0035.63 ▼3.2032.03 ▼6.25
Add New Post /wp-admin/post-new.php1,559 ▲2623.23 ▼0.18651.04 ▲3.2664.12 ▲12.37
Media Library /wp-admin/upload.php1,437 ▲554.31 ▲0.1199.00 ▼2.2842.00 ▼2.48
File Stats /wp-admin/admin.php?page=bq-download-menu-files1,2462.2122.9270.41
Downloads /wp-admin/admin.php?page=bq-download-menu8762.0524.9429.38
Help /wp-admin/admin.php?page=bq-download-menu-help1,3502.6823.6049.18
About /wp-admin/admin.php?page=bq-download-menu-about9963.2868.7036.01
Email Stats /wp-admin/admin.php?page=bq-download-menu-email9292.2025.9034.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
Smoke test failed, please fix the following
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-files
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-model.php+843
    Undefined offset: 0
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-files
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-model.php+843
    Trying to get property 'year' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-files
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-bar-chart.html.php+259
    Undefined variable: week_start
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-files
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-bar-chart.html.php+240
    Undefined variable: from_top
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-files
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-bar-chart.html.php+240
    Undefined variable: bar_pixels
  • 60 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-files
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-bar-chart.html.php+242
    Undefined variable: data_id
    • > GET request to /wp-admin/admin.php?page=bq-download-menu-help
    • > Notice in wp-content/plugins/download-manager-ms/bq-download-email-form.html.php+5
    Undefined variable: form_email_attachment

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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/download-manager-ms/bq-download-bar-chart.html.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === download-manager-ms === )
  • Screenshots: These screenshots require images: #1 (Download controls on a website.), #2 (30 Day Chart with shaded weekend days.), #3 (24 Month Chart showing long term download trend.), #4 (24 Hour Chart showing downloads per hour.), #5 (26 Week Chart), #6 (File List), #7 (Email List)
You can take inspiration from this readme.txt

download-manager-ms/init.php 92% from 13 tests

This is the main PHP file of "Download Manager MS" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("download-manager-ms.php" instead of "init.php")

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
No dangerous file extensions were detected3,904 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP306433923,478
CSS2542286
JavaScript2305140

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity41.33
▷ Minimum class complexity10.00
▷ Maximum class complexity129.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods125
▷ Static methods8265.60%
▷ Public methods10382.40%
▷ Protected methods1915.20%
▷ Private methods32.40%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png5.66KB2.61KB▼ 53.88%