82% media-select-bulk-downloader

Code Review | WordPress Media Select Bulk Downloader

WordPress plugin WordPress Media Select Bulk Downloader scored 82% from 53 tests.

About plugin

  • Plugin page: media-select-bulk...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 5.8.1
  • First release: Aug 24, 2016
  • Latest release: Aug 24, 2016
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: webwave (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

200+ active / 2,905 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼281.83ms] Passed 4 tests

An overview of server-side resources used by WordPress Media Select Bulk Downloader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1732.92 ▲11.16
Dashboard /wp-admin3.11 ▲0.0542.74 ▼0.16
Posts /wp-admin/edit.php3.22 ▲0.1139.56 ▼2.00
Add New Post /wp-admin/post-new.php5.47 ▲0.0491.17 ▼1,118.05
Media Library /wp-admin/upload.php3.05 ▲0.0433.82 ▼7.11
Media Downloader /wp-admin/upload.php?page=wp-msbd3.0429.54

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Media Select Bulk Downloader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲21416.29 ▲0.6012.00 ▲2.8652.28 ▲0.52
Dashboard /wp-admin2,970 ▲1206.17 ▲0.30150.59 ▲18.8198.62 ▼8.71
Posts /wp-admin/edit.php2,715 ▲92.69 ▲0.0168.03 ▲6.0892.09 ▲10.54
Add New Post /wp-admin/post-new.php1,860 ▼17619.11 ▲1.13370.82 ▼5.74106.89 ▲1.36
Media Library /wp-admin/upload.php1,784 ▲95.00 ▼0.09148.55 ▼7.79109.16 ▼7.58
Media Downloader /wp-admin/upload.php?page=wp-msbd1,1062.3353.3972.68

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/media-select-bulk-downloader/public/partials/wp-msbd-public-display.php
    • > /wp-content/plugins/media-select-bulk-downloader/admin/addfileToArchive.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/media-select-bulk-downloader/admin/partials/wp-msbd-admin-display.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/upload.php?page=wp-msbd
    • > Javascript (severe) in unknown
    /wp-admin/upload.php?page=wp-msbd 210:0 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/upload.php?page=wp-msbd
    • > Network (severe)
    wp-admin/%3C?echo%20get_site_url();?%3E/wp-includes/images/media/document.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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: Please specify the plugin name on the first line ( === media-select-bulk-downloader === )
The official readme.txt might help

media-select-bulk-downloader/wp-msbd.php 85% from 13 tests

The primary PHP file in "WordPress Media Select Bulk Downloader" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("media-select-bulk-downloader.php" instead of "wp-msbd.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin361 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14182598355
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin