83% simple-youtube-widget

Code Review | Simple Youtube Widget

WordPress plugin Simple Youtube Widget scored83%from 54 tests.

About plugin

  • Plugin page: simple-youtube-wi...
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 9, 2018
  • Latest release: Aug 25, 2020
  • Number of updates: 37
  • Update frequency: every 21.8 days
  • Top authors: ujw0l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.92ms] Passed 4 tests

Analyzing server-side resources used by Simple Youtube Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.91 ▼3.92
Dashboard /wp-admin3.35 ▲0.0147.86 ▼10.53
Posts /wp-admin/edit.php3.40 ▲0.0446.73 ▲1.68
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.88 ▼14.91
Media Library /wp-admin/upload.php3.27 ▲0.0433.80 ▲2.40

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_simple_youtube_widget
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Simple Youtube Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.78 ▲0.411.85 ▲0.1838.74 ▼5.16
Dashboard /wp-admin2,203 ▲245.84 ▲0.8999.33 ▼7.2039.96 ▼9.67
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0235.47 ▲0.2033.23 ▼5.11
Add New Post /wp-admin/post-new.php1,533 ▼023.26 ▲2.05647.25 ▼10.5957.37 ▲0.27
Media Library /wp-admin/upload.php1,388 ▲34.42 ▲0.1996.27 ▲1.8343.64 ▲1.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_simple_youtube_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-youtube-widget/simpleyoutube_plugin_widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid plugin version format
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of the front end with one feed), #2 (Screenshot of Backend widget area), #3 (Screenshot of how to get video id), #4 (Screenshot of how to get playlist id)
The official readme.txt might help

simple-youtube-widget/simpleyoutube_plugin_widget.php 92% from 13 tests

Analyzing the main PHP file in "Simple Youtube Widget" version 2.5.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-youtube-widget.php" instead of "simpleyoutube_plugin_widget.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
No dangerous file extensions were detected187 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13930140
JavaScript114047

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.32MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png3.53KB2.70KB▼ 23.45%
screenshot-1.png208.23KB56.29KB▼ 72.97%
screenshot-2.png112.65KB34.58KB▼ 69.30%
screenshot-4.png5.59KB3.93KB▼ 29.67%