72% multi-video-box

Code Review | Multi Video Box

WordPress plugin Multi Video Box scored72%from 54 tests.

About plugin

  • Plugin page: multi-video-box
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 24, 2013
  • Latest release: Jun 21, 2013
  • Number of updates: 18
  • Update frequency: every 20.9 days
  • Top authors: skustes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼2.48ms] Passed 4 tests

This is a short check of server-side resources used by Multi Video Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4445.67 ▲4.83
Dashboard /wp-admin3.74 ▲0.4048.47 ▼16.36
Posts /wp-admin/edit.php3.79 ▲0.4452.50 ▲6.19
Add New Post /wp-admin/post-new.php6.28 ▲0.3997.30 ▼2.70
Media Library /wp-admin/upload.php3.60 ▲0.3737.89 ▲4.32
Instructions /wp-admin/admin.php?page=mvob3.5735.54
Video Groups /wp-admin/admin.php?page=mvob_groups3.5839.44
Videos /wp-admin/admin.php?page=mvob_videos3.5833.21
Settings /wp-admin/admin.php?page=mvob_settings3.5732.59

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: 3 new tables, 9 new options
New tables
wp_mvob_groups
wp_mvob_videos_to_groups
wp_mvob_videos
New WordPress options
widget_recent-comments
mvob_options
ppd_mvob_options
theysaidso_admin_options
recovery_mode_email_last_sent
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Video Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲31514.08 ▼0.2111.61 ▲9.8437.99 ▼7.99
Dashboard /wp-admin2,248 ▲564.89 ▼0.08107.52 ▲1.2243.21 ▲2.34
Posts /wp-admin/edit.php2,131 ▲422.03 ▲0.0139.56 ▲5.6135.50 ▼0.18
Add New Post /wp-admin/post-new.php1,549 ▲1117.70 ▼5.71696.02 ▼4.0158.17 ▼0.24
Media Library /wp-admin/upload.php1,433 ▲424.30 ▲0.05100.15 ▼1.5743.39 ▼2.26
Instructions /wp-admin/admin.php?page=mvob9072.1922.5428.52
Video Groups /wp-admin/admin.php?page=mvob_groups9092.0423.4935.78
Videos /wp-admin/admin.php?page=mvob_videos7291.536.5215.54
Settings /wp-admin/admin.php?page=mvob_settings8642.0524.4223.46

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
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • recovery_mode_email_last_sent
    • ppd_mvob_options
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=mvob_videos
    • > Error in wp-content/plugins/multi-video-box/classes/class.video.php+71
    Uncaught ArgumentCountError: Too few arguments to function mvob_video::get_video_ids(), 0 passed in wp-content/plugins/multi-video-box/views/video/display_videos.php on line 7 and exactly 1 expected in wp-content/plugins/multi-video-box/classes/class.video.php:71
    Stack trace:
    #0 wp-content/plugins/multi-video-box/views/video/display_videos.php(7): mvob_video::get_video_ids()
    #1 wp-content/plugins/multi-video-box/functions/functions_menu.php(31): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): mvob_menu_videos()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/multi-video-box/views/common/instructions_shortcode.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: mvob_hidden_delete in wp-content/plugins/multi-video-box/views/video/delete_video.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'mvob_group_form' not found in wp-content/plugins/multi-video-box/views/group/add_group.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/multi-video-box/views/video/get_shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'mvob_video_form' not found in wp-content/plugins/multi-video-box/views/video/add_video_to_groups.php:35
    • > PHP Notice
      Undefined index: video_id in wp-content/plugins/multi-video-box/views/video/delete_video.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mvob_output_settings_form() in wp-content/plugins/multi-video-box/views/common/mvob_settings.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'mvob_group_form' not found in wp-content/plugins/multi-video-box/views/group/video_order.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'mvob_group' not found in wp-content/plugins/multi-video-box/views/group/display_groups.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'mvob_video' not found in wp-content/plugins/multi-video-box/classes/class.video_form.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'mvob_group' not found in wp-content/plugins/multi-video-box/classes/class.group_form.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (http://www.nuttymango.com/wp-content/uploads/2013/05/mvob-admin-1.png), #2 (http://www.nuttymango.com/wp-content/uploads/2013/05/mvob-admin-2.png), #3 (http://www.nuttymango.com/wp-content/uploads/2013/05/mvob-top-tab.png), #4 (http://www.nuttymango.com/wp-content/uploads/2013/05/mvob-left-tab.png)
The official readme.txt is a good inspiration

multi-video-box/multi-video-box.php 92% from 13 tests

The principal PHP file in "Multi Video Box" v. 1.5.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected3,371 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP326121,0222,809
JavaScript57379303
CSS367259

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity21.62
▷ Minimum class complexity7.00
▷ Maximum class complexity39.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods125
▷ Static methods86.40%
▷ Public methods5846.40%
▷ Protected methods00.00%
▷ Private methods6753.60%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow.png1.31KB1.16KB▼ 11.37%
images/down-arrow.png4.64KB2.46KB▼ 47.10%
images/prev-next-arrow.png0.30KB0.31KB0.00%
images/left-arrow.png4.51KB2.47KB▼ 45.32%
images/right-arrow.png4.66KB2.44KB▼ 47.64%