84% blob-mimes

Code Review | Lord of the Files: Enhanced Upload Security

WordPress plugin Lord of the Files: Enhanced Upload Security scored84%from 54 tests.

About plugin

  • Plugin page: blob-mimes
  • Plugin version: 1.3.17
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Oct 1, 2023
  • Number of updates: 185
  • Update frequency: every 12.8 days
  • Top authors: blobfolio (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /68,939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.33ms] Passed 4 tests

This is a short check of server-side resources used by Lord of the Files: Enhanced Upload Security
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1338.72 ▼4.04
Dashboard /wp-admin3.45 ▲0.1454.19 ▲2.56
Posts /wp-admin/edit.php3.56 ▲0.2050.97 ▲3.35
Add New Post /wp-admin/post-new.php6.03 ▲0.1493.32 ▼3.19
Media Library /wp-admin/upload.php3.37 ▲0.1442.50 ▲8.13
File Validation Reference /wp-admin/tools.php?page=blob-mimes-reference3.3531.60
File Settings /wp-admin/options-general.php?page=blob-mimes-settings3.3534.44
Debug File Validation /wp-admin/tools.php?page=blob-mimes-debug3.3633.19

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 57 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
lotf_cleanup

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lord of the Files: Enhanced Upload Security
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.82 ▲0.442.10 ▲0.2038.95 ▼4.33
Dashboard /wp-admin2,230 ▲245.85 ▲0.92100.28 ▼1.2737.89 ▼6.54
Posts /wp-admin/edit.php2,115 ▲151.99 ▼0.0042.82 ▲5.2436.12 ▼0.20
Add New Post /wp-admin/post-new.php1,554 ▲2323.34 ▲0.22695.03 ▲25.6563.86 ▲10.61
Media Library /wp-admin/upload.php1,415 ▲154.20 ▼0.0596.11 ▼18.7345.56 ▼5.13
File Validation Reference /wp-admin/tools.php?page=blob-mimes-reference1,6465.6960.8051.95
File Settings /wp-admin/options-general.php?page=blob-mimes-settings9262.0523.0329.31
Debug File Validation /wp-admin/tools.php?page=blob-mimes-debug9502.0225.4536.37

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\admin\\debug' not found in wp-content/plugins/blob-mimes/templates/debug.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\svg\\svg_base' not found in wp-content/plugins/blob-mimes/lib/blobfolio/wp/bm/svg/svg_fallback.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\admin\\page' not found in wp-content/plugins/blob-mimes/lib/blobfolio/wp/bm/admin/settings.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\admin\\page' not found in wp-content/plugins/blob-mimes/lib/blobfolio/wp/bm/admin/debug.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\svg\\svg_base' not found in wp-content/plugins/blob-mimes/lib/blobfolio/wp/bm/svg/svg_dom.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\svg\\svg_dom' not found in wp-content/plugins/blob-mimes/lib/blobfolio/wp/bm/svg.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\bm\\admin\\page' not found in wp-content/plugins/blob-mimes/lib/blobfolio/wp/bm/admin/reference.php:14

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 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can look at the official readme.txt

blob-mimes/index.php 92% from 13 tests

Analyzing the main PHP file in "Lord of the Files: Enhanced Upload Security" version 1.3.17
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("blob-mimes.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin13,205 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP215411,31013,091
Markdown460095
JavaScript50314
CSS3003
SVG2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity37.08
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity6.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes12
▷ Abstract classes325.00%
▷ Concrete classes975.00%
▷ Final classes444.44%
Methods84
▷ Static methods84100.00%
▷ Public methods4958.33%
▷ Protected methods2833.33%
▷ Private methods78.33%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants44
▷ Global constants715.91%
▷ Class constants3784.09%
▷ Public constants37100.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