83% embedded-youtube-playlist

Code Review | Embedded Youtube Playlist

WordPress plugin Embedded Youtube Playlist scored83%from 54 tests.

About plugin

  • Plugin page: embedded-youtube-...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Mar 11, 2022
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: pysga1996 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.93ms] Passed 4 tests

Server-side resources used by Embedded Youtube Playlist
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.80 ▲1.16
Dashboard /wp-admin3.31 ▲0.0144.19 ▼8.68
Posts /wp-admin/edit.php3.36 ▲0.0046.27 ▼2.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.62 ▼29.96
Media Library /wp-admin/upload.php3.23 ▲0.0036.09 ▲4.53

Server storage [IO: ▲1.00MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Embedded Youtube Playlist
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.50 ▼1.091.83 ▲0.1243.79 ▼1.74
Dashboard /wp-admin2,200 ▲155.86 ▲1.01106.81 ▼0.8240.32 ▼8.11
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0338.31 ▲0.4237.26 ▲3.45
Add New Post /wp-admin/post-new.php1,533 ▲1923.44 ▲5.89680.91 ▼9.7864.70 ▲12.35
Media Library /wp-admin/upload.php1,382 ▼94.19 ▼0.0397.14 ▼1.0444.39 ▼2.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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 no errors were found, this is by no means 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embedded-youtube-playlist/embedded-yt-playlist.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

embedded-youtube-playlist/embedded-yt-playlist.php 92% from 13 tests

This is the main PHP file of "Embedded Youtube Playlist" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("embedded-youtube-playlist.php" instead of "embedded-yt-playlist.php")

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
Success! There were no dangerous files found in this plugin55 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP172150
JavaScript2073
CSS1001
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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 Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected