83% html5-youtube-player

Code Review | HTML5 Youtube Player

WordPress plugin HTML5 Youtube Player scored83%from 54 tests.

About plugin

  • Plugin page: html5-youtube-player
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jul 28, 2017
  • Latest release: Jul 28, 2017
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: jabedbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼1.40ms] Passed 4 tests

Analyzing server-side resources used by HTML5 Youtube Player
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2638.55 ▼2.48
Dashboard /wp-admin3.63 ▲0.3241.45 ▼7.11
Posts /wp-admin/edit.php3.68 ▲0.3242.89 ▲4.03
Add New Post /wp-admin/post-new.php6.14 ▲0.2692.87 ▲0.61
Media Library /wp-admin/upload.php3.48 ▲0.2636.30 ▲3.40

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by HTML5 Youtube Player
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.111.85 ▼0.1237.71 ▼17.55
Dashboard /wp-admin2,209 ▲214.84 ▼0.97102.12 ▼16.2837.61 ▼8.92
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0142.72 ▲6.0135.08 ▼2.38
Add New Post /wp-admin/post-new.php1,542 ▲1918.38 ▼4.74603.55 ▼1.4053.41 ▲5.04
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.02108.55 ▲6.1243.23 ▼0.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/html5-youtube-player/plugin.php:83

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: custom, youtube mp3, youtube, html5, mp3...

html5-youtube-player/plugin.php 77% from 13 tests

The main PHP file in "HTML5 Youtube Player" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("html5-youtube-player.php" instead of "plugin.php")
  • Domain Path: The domain path folder was not found ("/languages")

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 plugin1,479 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42293421,479

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity87.75
▷ Minimum class complexity7.00
▷ Maximum class complexity198.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods93
▷ Static methods77.53%
▷ Public methods7176.34%
▷ Protected methods1718.28%
▷ Private methods55.38%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants2191.30%
▷ Class constants28.70%
▷ Public constants2100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon-128x128.png6.13KB2.94KB▼ 51.96%