72% ygvideo

Code Review | YGPlayer Embed

WordPress plugin YGPlayer Embed scored72%from 54 tests.

About plugin

  • Plugin page: ygvideo
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 28, 2019
  • Latest release: Mar 12, 2019
  • Number of updates: 4
  • Update frequency: every 3.0 days
  • Top authors: inkerapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼5.16MB] [CPU: ▼1,050,124.09ms] Passed 4 tests

An overview of server-side resources used by YGPlayer Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▼20.7643.85 ▼4,200,476.73
Dashboard /wp-admin3.38 ▲0.0352.57 ▼5.38
Posts /wp-admin/edit.php3.49 ▲0.0951.96 ▲0.89
Add New Post /wp-admin/post-new.php5.98 ▲0.0591.14 ▼13.44
Media Library /wp-admin/upload.php3.30 ▲0.0339.80 ▼0.82
YGVideo Wizard /wp-admin/admin.php?page=ygvideo-wizard3.2835.08

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for YGPlayer Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.19 ▼0.161.70 ▼0.2643.86 ▼0.26
Dashboard /wp-admin2,202 ▲285.70 ▲0.0388.89 ▼9.2939.39 ▼8.02
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0036.59 ▼0.8733.32 ▼5.58
Add New Post /wp-admin/post-new.php1,530 ▲423.24 ▲0.21655.58 ▼121.2360.86 ▼4.48
Media Library /wp-admin/upload.php1,401 ▲14.20 ▲0.0899.86 ▼14.8241.38 ▼9.14
YGVideo Wizard /wp-admin/admin.php?page=ygvideo-wizard7291.6623.6824.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ygvideo-wizard
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ygvideo-wizard
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% 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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ygvideo/views/wizard_form.php
    • > /wp-content/plugins/ygvideo/views/media_button.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ygvideo/views/wizard_preview.php on line 5
    • > PHP Notice
      Undefined variable: href in wp-content/plugins/ygvideo/views/media_button.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ygvideo/views/wizard_preview.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ygvideo/ygvideo.php:19
    • > PHP Notice
      Undefined variable: typeList in wp-content/plugins/ygvideo/views/wizard_preview.php on line 5

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Version format is invalid
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

ygvideo/ygvideo.php Passed 13 tests

The primary PHP file in "YGPlayer Embed" version 1.1 is used by WordPress to initiate all plugin functionality
31 characters long description:
YGVideo Embed WordPress Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin311 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP42637174
CSS38868
JavaScript25156
SVG10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods787.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected