83% display-youtube-subs

Code Review | display-youtube-subs

WordPress plugin display-youtube-subs scored83%from 54 tests.

About plugin

  • Plugin page: display-youtube-subs
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 24, 2018
  • Latest release: Nov 24, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: wp9579 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /879 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.37ms] Passed 4 tests

An overview of server-side resources used by display-youtube-subs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0522.68 ▼15.39
Dashboard /wp-admin3.34 ▲0.0443.87 ▼1.14
Posts /wp-admin/edit.php3.39 ▲0.0347.11 ▼3.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.56 ▼5.92
Media Library /wp-admin/upload.php3.26 ▲0.0333.79 ▼0.32

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

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

Browser metrics Passed 4 tests

display-youtube-subs: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.40 ▼0.986.38 ▲4.6835.55 ▼7.90
Dashboard /wp-admin2,206 ▲155.83 ▼0.0797.65 ▼16.0541.45 ▲0.82
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0440.09 ▲0.3735.57 ▼0.38
Add New Post /wp-admin/post-new.php1,536 ▲1723.40 ▲0.26661.16 ▼18.2355.35 ▼4.31
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0897.35 ▼0.0645.18 ▼0.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_youtubesubs_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/display-youtube-subs/inc/ytwidget-class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-youtube-subs/inc/youtubesubs.php:15

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === display-youtube-subs === )
  • Screenshots: These screenshots need descriptions #1, #2, #3 in display-youtube-subs/assets to your readme.txt
Please take inspiration from this readme.txt

display-youtube-subs/widget.php 85% from 13 tests

"display-youtube-subs" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("display-youtube-subs.php" instead of "widget.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin112 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33147112

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected