79% yt-player

Code Review | Video Player for YouTube

WordPress plugin Video Player for YouTube scored79%from 54 tests.

About plugin

  • Plugin page: yt-player
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Apr 17, 2019
  • Latest release: Oct 14, 2023
  • Number of updates: 72
  • Update frequency: every 22.8 days
  • Top authors: abuhayat (65.28%)shehabulislam (36.11%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /35,951 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.34MB] [CPU: ▲37.38ms] 75% from 4 tests

A check of server-side resources used by Video Player for YouTube
The following require your attention
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.34MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4186.96 ▲46.26
Dashboard /wp-admin8.90 ▲5.5587.20 ▲28.13
Posts /wp-admin/edit.php8.90 ▲5.5485.09 ▲41.47
Add New Post /wp-admin/post-new.php10.75 ▲4.87124.41 ▲34.62
Media Library /wp-admin/upload.php8.90 ▲5.6781.45 ▲45.28
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9069.30

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 360 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
ytp_import_ver
widget_recent-comments
fs_accounts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

Video Player for YouTube: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲12814.77 ▲0.054.11 ▲2.5531.19 ▼9.20
Dashboard /wp-admin2,214 ▲395.57 ▼0.0485.46 ▼29.5974.73 ▲28.09
Posts /wp-admin/edit.php2,138 ▲381.95 ▼0.0736.68 ▼1.6834.82 ▲2.75
Add New Post /wp-admin/post-new.php1,697 ▲16921.09 ▼1.99729.82 ▲92.7360.59 ▲7.48
Media Library /wp-admin/upload.php1,434 ▲344.20 ▼0.0094.30 ▼9.08100.37 ▲57.75
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0991.6826.3523.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/yt-player/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • ytp_import_ver
    • widget_recent-comments
    • fs_debug_mode
    • theysaidso_admin_options
    • fs_active_plugins
    • can_compress_scripts
    • fs_accounts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please describe screenshot #5 in yt-player/assets to your readme.txt
Please take inspiration from this readme.txt

yt-player/yt-player.php 92% from 13 tests

The main file in "Video Player for YouTube" v. 1.5.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected73,336 lines of code in 290 files:
LanguageFilesBlank linesComment linesLines of code
PHP22111,56019,01049,195
JavaScript101,3195576,746
PO File203,1983,5916,500
Sass1697035,672
CSS193935124,992
Markdown1680214
JSON10015
SVG2002

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity50.70
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes121
▷ Abstract classes43.31%
▷ Concrete classes11796.69%
▷ Final classes00.00%
Methods1,573
▷ Static methods25516.21%
▷ Public methods1,18275.14%
▷ Protected methods171.08%
▷ Private methods37423.78%
Functions128
▷ Named functions12597.66%
▷ Anonymous functions32.34%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
img/icon.png1.52KB0.91KB▼ 40.10%
admin/framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%