84% awsome-youtube-subscribe

Code Review | Awesome Youtube Subscribe

WordPress plugin Awesome Youtube Subscribe scored84%from 54 tests.

About plugin

  • Plugin page: awsome-youtube-su...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Oct 26, 2018
  • Number of updates: 7
  • Update frequency: every 82.0 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.24ms] Passed 4 tests

Analyzing server-side resources used by Awesome Youtube Subscribe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.30 ▼3.02
Dashboard /wp-admin3.37 ▲0.0250.34 ▼11.85
Posts /wp-admin/edit.php3.48 ▲0.1245.52 ▼6.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.38 ▼15.66
Media Library /wp-admin/upload.php3.29 ▲0.0639.26 ▲4.73
Awesome YouTube Subscribe /wp-admin/options-general.php?page=sm-youtube-subscribe3.2632.82

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_smyoutubesubscribe_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Awesome Youtube Subscribe
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.62 ▼0.981.69 ▲0.0343.03 ▼0.12
Dashboard /wp-admin2,210 ▲225.90 ▲0.07111.04 ▲8.9242.94 ▲0.03
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0635.12 ▼0.5231.37 ▼0.14
Add New Post /wp-admin/post-new.php1,531 ▼223.30 ▲0.04674.63 ▲3.6956.73 ▲5.33
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0299.72 ▲0.2146.13 ▲4.19
Awesome YouTube Subscribe /wp-admin/options-general.php?page=sm-youtube-subscribe8302.0326.6533.74

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_smyoutubesubscribe_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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× 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/awsome-youtube-subscribe/easy-youtube-subscribe.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/awsome-youtube-subscribe/includes/sm-youtube-subscription-shortcode.php:216

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === awsome-youtube-subscribe === )
The official readme.txt might help

awsome-youtube-subscribe/easy-youtube-subscribe.php 92% from 13 tests

The entry point to "Awesome Youtube Subscribe" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("awsome-youtube-subscribe.php" instead of "easy-youtube-subscribe.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
Good job! No executable or dangerous file extensions detected238 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25665238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.50
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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 images were found in this plugin