78% cool-yt-player

Code Review | Cool YT Player

WordPress plugin Cool YT Player scored78%from 54 tests.

About plugin

  • Plugin page: cool-yt-player
  • Plugin version: 1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Dec 11, 2020
  • Number of updates: 17
  • Update frequency: every 10.1 days
  • Top authors: matiasanca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /673 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: ▲0.00MB] [CPU: ▼4.79ms] Passed 4 tests

An overview of server-side resources used by Cool YT Player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.07 ▼4.57
Dashboard /wp-admin3.31 ▲0.0044.49 ▼9.02
Posts /wp-admin/edit.php3.36 ▲0.0045.80 ▲7.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.18 ▼10.40
Media Library /wp-admin/upload.php3.23 ▲0.0037.46 ▲4.85

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cool YT Player
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16714.18 ▼0.2212.21 ▲10.2540.85 ▼4.74
Dashboard /wp-admin2,203 ▲155.80 ▼0.0896.20 ▼21.5537.76 ▼2.90
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0242.26 ▲3.4635.74 ▲0.81
Add New Post /wp-admin/post-new.php1,514 ▼1417.61 ▼0.38649.78 ▼20.8054.56 ▼9.50
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0396.78 ▼4.6140.51 ▼1.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 0% 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cool-yt-player/includes/includes.php
    • > /wp-content/plugins/cool-yt-player/settings.php
    • > /wp-content/plugins/cool-yt-player/includes/youtube_video_wrapper.php
    • > /wp-content/plugins/cool-yt-player/public/public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cool-yt-player/mcytp.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
7 plugin tags: video player, youtube, insert, embed, shortcodes...

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

"Cool YT Player" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cool-yt-player.php" instead of "mcytp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin438 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS127200
JavaScript13282147
PHP6305791

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/stop_24x24.png0.18KB0.13KB▼ 25.81%
public/img/settings_64x64.png1.09KB0.69KB▼ 36.76%
public/img/fullscreen_64x64.png0.53KB0.25KB▼ 53.25%
public/img/restart_64x64.png1.41KB1.10KB▼ 21.57%
public/img/stop_64x64.png0.28KB0.17KB▼ 40.42%