73% wpmbytplayer

Code Review | mb.YTPlayer for background videos

WordPress plugin mb.YTPlayer for background videos scored 73% from 54 tests.

About plugin

  • Plugin page: wpmbytplayer
  • Plugin version: 3.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 7, 2012
  • Latest release: Sep 14, 2023
  • Number of updates: 327
  • Update frequency: every 12.7 days
  • Top authors: pupunzi (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

2,000+ active / 248,756 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by mb.YTPlayer for background videos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.71 ▲4.36
Dashboard /wp-admin3.44 ▲0.1345.07 ▼9.85
Posts /wp-admin/edit.php3.49 ▲0.1347.25 ▲3.18
Add New Post /wp-admin/post-new.php6.03 ▲0.15108.31 ▲11.96
Media Library /wp-admin/upload.php3.36 ▲0.1335.70 ▲3.80
YTPlayer /wp-admin/admin.php?page=wpmbytplayer/mbYTPlayer.php3.3333.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 14 new options
New WordPress options
mbYTPlayer_video_url
widget_recent-posts
mbYTPlayer_video_page
widget_theysaidso_widget
mbYTPlayer_init_delay
mbYTPlayer_version
mbYTPlayer_price
widget_recent-comments
theysaidso_admin_options
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for mb.YTPlayer for background videos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.88 ▼0.426.32 ▲4.4537.90 ▼2.65
Dashboard /wp-admin2,236 ▲454.88 ▼1.04108.42 ▲2.4138.94 ▼4.96
Posts /wp-admin/edit.php2,115 ▲292.04 ▲0.0141.62 ▲5.8036.56 ▲5.12
Add New Post /wp-admin/post-new.php1,536 ▲217.72 ▼5.60654.97 ▼16.8148.58 ▼5.05
Media Library /wp-admin/upload.php1,415 ▲244.31 ▲0.1296.51 ▼1.5744.38 ▲1.97
YTPlayer /wp-admin/admin.php?page=wpmbytplayer/mbYTPlayer.php1,3844.81119.4955.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wpmbytplayer/uninstall.php+6
    Undefined variable: ytppro
  • Zombie WordPress options detected upon uninstall: 13 options
    • mbYTPlayer_is_active
    • db_upgraded
    • mbYTPlayer_price
    • mbYTPlayer_video_page
    • widget_theysaidso_widget
    • mbYTPlayer_video_url
    • theysaidso_admin_options
    • mbYTPlayer_remember_last_time
    • _notice_dismiss
    • mbYTPlayer_init_delay
    • ...

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpmbytplayer/inc/mb-admin-menu.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wpmbytplayer/mbYTPlayer.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (The settings panel.), #2 (You can add a video as background or targeted to a DOM element in any page or post by inserting a shortcode (Plus version) generated via the editor button.), #3 (The shortcode editor (Plus version).)
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
The official readme.txt might help

wpmbytplayer/mbYTPlayer.php 85% from 13 tests

"mb.YTPlayer for background videos" version 3.3.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpmbytplayer.php" instead of "mbYTPlayer.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,916 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34757091,788
PHP49447638
PO File2410943263
CSS2401199
SVG10128

PHP code Passed 2 tests

Analyzing 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.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions1881.82%
▷ Anonymous functions418.18%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.34MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/raster_dot.png0.12KB0.10KB▼ 13.11%
css/images/raster@2x.png2.73KB0.10KB▼ 96.17%
images/wm.png3.37KB1.58KB▼ 53.18%
images/logo.png3.30KB1.87KB▼ 43.51%
images/general-bgnd.png6.61KB3.57KB▼ 45.95%