84% lightweight-youtube-channel-widget

Code Review | Lightweight YouTube Channel Widget

WordPress plugin Lightweight YouTube Channel Widget scored84%from 54 tests.

About plugin

  • Plugin page: lightweight-youtu...
  • Plugin version: 10.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: Jan 5, 2015
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: MaTachi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.69ms] Passed 4 tests

Analyzing server-side resources used by Lightweight YouTube Channel Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1036.86 ▼2.71
Dashboard /wp-admin3.41 ▲0.0646.47 ▼12.99
Posts /wp-admin/edit.php3.46 ▲0.1048.78 ▲5.33
Add New Post /wp-admin/post-new.php5.99 ▲0.1092.02 ▼9.78
Media Library /wp-admin/upload.php3.33 ▲0.1035.72 ▲2.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_lightweight-youtube-channel-widget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Lightweight YouTube Channel Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.52 ▼1.131.74 ▼0.4140.42 ▼2.91
Dashboard /wp-admin2,206 ▲154.82 ▼0.07109.66 ▲7.1441.22 ▼2.68
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0641.28 ▲4.4734.38 ▼1.69
Add New Post /wp-admin/post-new.php1,534 ▲1522.89 ▼0.21582.04 ▼61.4854.34 ▼0.26
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0495.84 ▼8.1441.32 ▼3.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_lightweight-youtube-channel-widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lightweight-youtube-channel-widget/inc/widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: playlist, sidebar, video, youtube, favorites...

lightweight-youtube-channel-widget/youtube-channel.php 92% from 13 tests

This is the main PHP file of "Lightweight YouTube Channel Widget" version 10.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lightweight-youtube-channel-widget.php" instead of "youtube-channel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected818 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP282103438
SVG111161
PO File16368143
CSS22176

PHP code Passed 2 tests

An overview 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.25
Average class complexity33.50
▷ Minimum class complexity33.00
▷ Maximum class complexity34.00
Average method complexity6.42
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods758.33%
▷ Protected methods00.00%
▷ Private methods541.67%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/play.png1.57KB1.30KB▼ 16.90%