84% youtube-metabox

Code Review | YouTube metabox

WordPress plugin YouTube metabox scored84%from 54 tests.

About plugin

  • Plugin page: youtube-metabox
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.8
  • WordPress version: 6.3.1
  • First release: Dec 18, 2013
  • Latest release: Jan 17, 2017
  • Number of updates: 17
  • Update frequency: every 66.2 days
  • Top authors: congbom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,995 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.24ms] Passed 4 tests

A check of server-side resources used by YouTube metabox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.14 ▼3.46
Dashboard /wp-admin3.31 ▼0.0344.39 ▼16.19
Posts /wp-admin/edit.php3.37 ▲0.0146.78 ▼0.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.84 ▼16.74
Media Library /wp-admin/upload.php3.24 ▲0.0136.77 ▲7.58

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for YouTube metabox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.113.79 ▲2.0441.79 ▲0.34
Dashboard /wp-admin2,206 ▲145.84 ▲0.90108.96 ▲4.7042.24 ▼4.85
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0336.36 ▼6.4331.25 ▼7.25
Add New Post /wp-admin/post-new.php7,010 ▲5,48831.11 ▲8.101,133.54 ▲530.1144.08 ▼8.29
Media Library /wp-admin/upload.php1,388 ▲34.30 ▲0.1496.20 ▼3.3243.31 ▲2.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-metabox/youtube-metabox.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

youtube-metabox/youtube-metabox.php Passed 13 tests

"YouTube metabox" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
50 characters long description:
Create YouTube meta-box for post with live preview

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171043

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin