56% youtube-webtv

Code Review | Youtube WebTv

WordPress plugin Youtube WebTv scored 56% from 54 tests.

About plugin

  • Plugin page: youtube-webtv
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-3.9.2
  • WordPress version: 5.8.1
  • First release: Aug 13, 2014
  • Latest release: Aug 13, 2014
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: felicemarra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,767 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.07MB] [CPU: ▼186.30ms] Passed 4 tests

Analyzing server-side resources used by Youtube WebTv
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0247.92 ▲6.61
Dashboard /wp-admin2.58 ▼0.4720.14 ▼37.83
Posts /wp-admin/edit.php2.58 ▼0.5215.84 ▼34.78
Add New Post /wp-admin/post-new.php2.58 ▼2.8516.61 ▼653.12
Media Library /wp-admin/upload.php2.58 ▼0.4220.97 ▼19.45
Youtube WebTv /wp-admin/options-general.php?page=yt_webtv_options2.5817.57

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 3 new options
New WordPress options
yt_webtv_channel_
yt_webtv_channel_tot
yt_webtv_channel_1

Browser metrics Passed 4 tests

This is an overview of browser requirements for Youtube WebTv
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,898 ▲32617.80 ▲2.4831.24 ▲19.3555.27 ▼1.12
Dashboard /wp-admin2,988 ▲545.89 ▲0.03152.74 ▼21.42116.06 ▼5.59
Posts /wp-admin/edit.php2,763 ▲242.75 ▲0.0372.12 ▼6.4491.59 ▼6.87
Add New Post /wp-admin/post-new.php1,695 ▲8018.79 ▼2.34428.57 ▲91.51114.46 ▼0.37
Media Library /wp-admin/upload.php1,825 ▲185.05 ▲0.02157.53 ▼11.64123.91 ▼0.58
Youtube WebTv /wp-admin/options-general.php?page=yt_webtv_options1,1612.4260.9290.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
  • The uninstall procedure has failed, leaving 3 options in the database
    • yt_webtv_channel_1
    • yt_webtv_channel_tot
    • yt_webtv_channel_

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=yt_webtv_options
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
    • > GET request to /wp-admin/options-general.php?page=yt_webtv_options
    • > Notice in wp-content/plugins/youtube-webtv/ytWebTv_admin.php+95
    Array to string conversion

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/youtube-webtv/youtube-web-tv.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/youtube-webtv/ytWebTv_admin.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=yt_webtv_options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: Unexpected token A in JSON at position 0" "SyntaxError: Unexpected token A in JSON at position 0\n at JSON.parse (\u003Canonymous>)\n at ytWebTv_playlist_admin_view (/wp-admin/options-general.php?page=yt_webtv_options:240:33)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=yt_webtv_options:260:2)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=yt_webtv_options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught SyntaxError: Unexpected token A in JSON at position 0

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (http://www.felicemarra.com/wordpress/wp-content/uploads/2014/08/ytWebTv_shot1.jpg)
You can look at the official readme.txt

youtube-webtv/youtube-web-tv.php 92% from 13 tests

The main file in "Youtube WebTv" v. 0.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("youtube-webtv.php" instead of "youtube-web-tv.php")

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
Good job! No executable or dangerous file extensions detected364 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23322230
CSS115067
JavaScript16267

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
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
delete.png2.68KB1.90KB▼ 29.12%