90% bulk-attachment-download

Code Review | Bulk Attachment Download

WordPress plugin Bulk Attachment Download scored90%from 54 tests.

About plugin

  • Plugin page: bulk-attachment-d...
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-6.2
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Jul 6, 2023
  • Number of updates: 81
  • Update frequency: every 29.9 days
  • Top authors: janwyl (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

2,000+ active /27,884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.91ms] Passed 4 tests

An overview of server-side resources used by Bulk Attachment Download
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.67 ▼4.67
Dashboard /wp-admin3.31 ▼0.0443.77 ▼18.13
Posts /wp-admin/edit.php3.36 ▲0.0046.94 ▲2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.45 ▼19.25
Media Library /wp-admin/upload.php3.23 ▲0.0032.56 ▼1.58

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 191 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
fs_debug_mode
can_compress_scripts
fs_accounts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Bulk Attachment Download
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.321.64 ▼0.0438.80 ▼4.41
Dashboard /wp-admin2,200 ▲175.83 ▼0.0798.32 ▼4.9837.29 ▼5.44
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0540.10 ▲4.9834.96 ▲2.36
Add New Post /wp-admin/post-new.php1,528 ▼1523.35 ▲5.00652.28 ▲2.4855.63 ▼1.65
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.0095.81 ▼4.0141.06 ▼1.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • fs_active_plugins
    • fs_accounts
    • widget_recent-posts
    • fs_debug_mode
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: images, bulk, download, media, attachments

bulk-attachment-download/bulk-attachment-download.php Passed 13 tests

The primary PHP file in "Bulk Attachment Download" version 1.3.7 is used by WordPress to initiate all plugin functionality
85 characters long description:
Bulk download media or attachments selectively from your Media Library as a zip file.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin35,739 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP1218,52818,01434,734
JavaScript689102458
Markdown1680214
PO File182103190
CSS17178143

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity95.78
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,342
▷ Static methods23017.14%
▷ Public methods93069.30%
▷ Protected methods171.27%
▷ Private methods39529.43%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%