83% widget-youtube-subscribtion

Code Review | Easy Subscribe Button Widget

WordPress plugin Easy Subscribe Button Widget scored 83% from 54 tests.

About plugin

  • Plugin page: widget-youtube-su...
  • Plugin version: 1.0.17
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 30, 2018
  • Latest release: Aug 14, 2023
  • Number of updates: 89
  • Update frequency: every 21.7 days
  • Top authors: apsaraaruna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 21,598 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.03MB] [CPU: ▼3.81ms] Passed 4 tests

An overview of server-side resources used by Easy Subscribe Button Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.27 ▼2.17
Dashboard /wp-admin3.33 ▲0.0346.06 ▲0.55
Posts /wp-admin/edit.php3.38 ▲0.0345.69 ▼4.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.90 ▼7.67
Media Library /wp-admin/upload.php3.25 ▲0.0334.36 ▼1.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Easy Subscribe Button Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.45 ▼0.996.19 ▲4.4437.22 ▼12.40
Dashboard /wp-admin2,200 ▲125.83 ▼0.01101.13 ▼3.9238.13 ▼2.13
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0139.12 ▼0.9235.73 ▲0.18
Add New Post /wp-admin/post-new.php1,542 ▲918.14 ▼5.20615.92 ▼53.3055.04 ▲1.67
Media Library /wp-admin/upload.php1,385 ▼04.22 ▲0.0394.65 ▼11.2743.88 ▼3.65

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_apyt_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 items
  • 2× 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/widget-youtube-subscribtion/includes/youtubesubs-class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-youtube-subscribtion/includes/youtubesubs-scripts.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 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #3 in widget-youtube-subscribtion/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

widget-youtube-subscribtion/youtubesubs.php 85% from 13 tests

Analyzing the main PHP file in "Easy Subscribe Button Widget" version 1.0.17
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-youtube-subscribtion.php" instead of "youtubesubs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin89 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3211389

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin