10% wp-youtube-playlist-widget

Code Review | Wordpress Youtube Playlist Widget

WordPress plugin Wordpress Youtube Playlist Widget scored 10% from 54 tests.

About plugin

  • Plugin page: wp-youtube-playli...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 8, 2015
  • Latest release: Nov 18, 2016
  • Number of updates: 17
  • Update frequency: every 25.8 days
  • Top authors: srikanthlavudia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active / 3,994 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-youtube-playlist-widget/wp-youtube-playlist-widget.php+233
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.22ms] Passed 4 tests

An overview of server-side resources used by Wordpress Youtube Playlist Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.07 ▼39.10
Dashboard /wp-admin2.05 ▼1.266.79 ▼42.44
Posts /wp-admin/edit.php2.05 ▼1.315.16 ▼36.50
Add New Post /wp-admin/post-new.php2.05 ▼3.846.16 ▼94.82
Media Library /wp-admin/upload.php2.05 ▼1.184.76 ▼29.42

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_wordpressyoutubeplaylistwidget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress Youtube Playlist Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19014.38 ▼0.208.46 ▲6.5942.74 ▼2.28
Dashboard /wp-admin2,203 ▲145.11 ▲0.16105.52 ▼12.0042.95 ▼0.42
Posts /wp-admin/edit.php2,091 ▲22.29 ▲0.2736.87 ▲0.0331.50 ▼1.92
Add New Post /wp-admin/post-new.php1,533 ▲1423.18 ▲2.20664.53 ▲42.7166.56 ▲16.49
Media Library /wp-admin/upload.php1,385 ▼34.48 ▲0.3293.46 ▼5.5541.26 ▲0.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-core handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_wordpressyoutubeplaylistwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-youtube-playlist-widget/wp-youtube-playlist-widget.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: youtube-playlist, videos, youtube playlist, youtube, youtube playlist videos...

wp-youtube-playlist-widget/wp-youtube-playlist-widget.php 92% from 13 tests

"Wordpress Youtube Playlist Widget" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 422 characters long)

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 detected196 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13467133
CSS12945
JavaScript10718

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 1.25MB with 0.86MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-screenshots/screenshot-4.png528.92KB138.55KB▼ 73.81%
plugin-screenshots/screenshot-2.png83.80KB28.57KB▼ 65.91%
plugin-screenshots/screenshot-1.png29.31KB10.49KB▼ 64.21%
images/play128.png1.58KB0.52KB▼ 66.91%
plugin-screenshots/screenshot-3.png634.52KB172.09KB▼ 72.88%