83% playlist-for-youtube

Code Review | Playlist for Youtube

WordPress plugin Playlist for Youtube scored83%from 54 tests.

About plugin

  • Plugin page: playlist-for-youtube
  • Plugin version: 1.32
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Jul 31, 2023
  • Number of updates: 33
  • Update frequency: every 82.6 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,918 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.01MB] [CPU: ▼5.45ms] Passed 4 tests

This is a short check of server-side resources used by Playlist for Youtube
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.19 ▲0.48
Dashboard /wp-admin3.32 ▲0.0150.57 ▲0.15
Posts /wp-admin/edit.php3.37 ▲0.0150.04 ▼1.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.09 ▼20.39
Media Library /wp-admin/upload.php3.24 ▲0.0136.12 ▲0.13
Playlists Youtube free /wp-admin/admin.php?page=playlists_yt_free3.2533.52
Settings /wp-admin/admin.php?page=playlist-yt-settings3.2332.91

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

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

Browser metrics Passed 4 tests

Playlist for Youtube: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13113.41 ▼0.947.90 ▲6.2641.79 ▼3.07
Dashboard /wp-admin2,204 ▲305.53 ▼0.0587.65 ▼0.1178.95 ▲38.36
Posts /wp-admin/edit.php2,127 ▲241.98 ▼0.0538.01 ▼2.7534.18 ▼3.73
Add New Post /wp-admin/post-new.php1,560 ▲3218.18 ▼4.75664.31 ▲10.8051.46 ▼3.90
Media Library /wp-admin/upload.php1,427 ▲274.21 ▲0.0698.40 ▼2.5475.16 ▲26.91
Playlists Youtube free /wp-admin/admin.php?page=playlists_yt_free8722.0124.0025.65
Settings /wp-admin/admin.php?page=playlist-yt-settings8242.0126.1927.85

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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 shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 91× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Licensing.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/AdSense.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Logging.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Translate.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Reports.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Dns.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/GroupsMigration.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Appsactivity.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Fusiontables.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/playlist-for-youtube/vendor/google/apiclient/src/Google/Service/Script.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt might help

playlist-for-youtube/playlist-youtube.php 69% from 13 tests

The main file in "Playlist for Youtube" v. 1.32 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path must begin with a forward slash character ("/")
  • Main file name: The principal plugin file should be the same as the plugin slug ("playlist-for-youtube.php" instead of "playlist-youtube.php")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • 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 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
Everything looks great! No dangerous files found in this plugin198,216 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP14712,50236,685196,318
JavaScript127111,102
CSS34216445
HTML110130
Markdown249078
JSON30077
XML10034
YAML19232

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.01
Average class complexity1.17
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.02
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes3,563
▷ Abstract classes60.17%
▷ Concrete classes3,55799.83%
▷ Final classes00.00%
Methods27,628
▷ Static methods150.05%
▷ Public methods27,55999.75%
▷ Protected methods300.11%
▷ Private methods390.14%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants297
▷ Global constants10.34%
▷ Class constants29699.66%
▷ Public constants296100.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.47KB0.41KB▼ 12.29%
images/remove.png1.27KB1.20KB▼ 5.76%
images/save.png0.54KB0.39KB▼ 28.11%
images/play.png1.69KB1.18KB▼ 29.84%
js/lightslider-master/img/controls.png2.19KB0.95KB▼ 56.49%