10% mb-youtube-videos

Code Review | (MB) YouTube Widget

WordPress plugin (MB) YouTube Widget scored10%from 54 tests.

About plugin

  • Plugin page: mb-youtube-videos
  • Plugin version: 1.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Aug 2, 2013
  • Number of updates: 47
  • Update frequency: every 4.8 days
  • Top authors: Mechabyte (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /11,592 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/mb-youtube-videos/mechabyte-youtube.php+22
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.44ms] Passed 4 tests

An overview of server-side resources used by (MB) YouTube Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.63 ▼36.19
Dashboard /wp-admin2.05 ▼1.265.42 ▼43.68
Posts /wp-admin/edit.php2.05 ▼1.315.18 ▼38.51
Add New Post /wp-admin/post-new.php2.05 ▼3.845.18 ▼87.38
Media Library /wp-admin/upload.php2.05 ▼1.185.23 ▼28.64

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_mechabyte-youtube-widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for (MB) YouTube Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.61 ▼0.781.62 ▼0.1441.53 ▼2.64
Dashboard /wp-admin2,209 ▲185.86 ▲0.97104.81 ▼0.7538.50 ▼4.99
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0239.00 ▲1.0135.64 ▲4.54
Add New Post /wp-admin/post-new.php1,534 ▲123.01 ▲0.02656.32 ▲9.7560.66 ▼6.92
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.0792.84 ▼6.9839.92 ▼2.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/mb-youtube-videos/mechabyte-youtube.php+22
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_mechabyte-youtube-widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mb-youtube-videos/mechabyte-youtube.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: recent videos, videos, youtube, social, subscribe...

mb-youtube-videos/mechabyte-youtube.php 92% from 13 tests

The principal PHP file in "(MB) YouTube Widget" v. 1.05 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mb-youtube-videos.php" instead of "mechabyte-youtube.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
Everything looks great! No dangerous files found in this plugin323 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15552220
Markdown126069
CSS11034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity13.00
▷ Minimum class complexity7.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mb-youtube-bg.png2.74KB0.09KB▼ 96.57%