83% media-vault

Code Review | Media Vault

WordPress plugin Media Vault scored83%from 54 tests.

About plugin

  • Plugin page: media-vault
  • Plugin version: 0.8.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2013
  • Latest release: Feb 18, 2014
  • Number of updates: 50
  • Update frequency: every 2.5 days
  • Top authors: Max GJP (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /15,370 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼7.85ms] Passed 4 tests

Server-side resources used by Media Vault
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.43 ▼1.06
Dashboard /wp-admin3.49 ▲0.1451.55 ▼12.93
Posts /wp-admin/edit.php3.60 ▲0.2552.06 ▲1.15
Add New Post /wp-admin/post-new.php6.07 ▲0.1887.91 ▼18.55
Media Library /wp-admin/upload.php3.55 ▲0.3340.23 ▲2.14

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

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.80KB) outside of "wp-content/plugins/media-vault/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
mgjp_mv_default_permission
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Media Vault: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.31 ▼0.011.74 ▼0.2038.94 ▼6.50
Dashboard /wp-admin2,198 ▲245.62 ▼0.0487.12 ▼0.9341.24 ▼3.32
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0135.29 ▼6.1334.61 ▼1.27
Add New Post /wp-admin/post-new.php1,538 ▲1218.18 ▼4.90619.81 ▼27.3167.68 ▲7.95
Media Library /wp-admin/upload.php1,493 ▲964.34 ▲0.16101.32 ▼13.8342.43 ▼3.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-vault/mv-extra-activation-steps.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_setting() in wp-content/plugins/media-vault/mv-options-media-vault.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-vault/mv-options-media-library.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/media-vault/_mediavault.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-vault/mv-options-media-new.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/media-vault/mv-metaboxes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-vault/mv-extra-deactivation-steps.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

media-vault/_mediavault.php 77% from 13 tests

"Media Vault" version 0.8.12's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("media-vault.php" instead of "_mediavault.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,951 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP139069981,834
JavaScript6409112
CSS5005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity5.67
▷ Minimum method complexity2.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions75
▷ Named functions75100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
imgs/media-vault-logo.png17.40KB8.19KB▼ 52.95%