84% easy-youtube-subscribe

Code Review | YouTube Subscribe

WordPress plugin YouTube Subscribe scored 84% from 54 tests.

About plugin

  • Plugin page: easy-youtube-subs...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: May 27, 2020
  • Number of updates: 35
  • Update frequency: every 44.2 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active / 36,283 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.13ms] Passed 4 tests

An overview of server-side resources used by YouTube Subscribe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.87 ▼5.82
Dashboard /wp-admin3.37 ▲0.0743.33 ▼9.62
Posts /wp-admin/edit.php3.48 ▲0.1347.91 ▼2.24
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.03 ▼10.83
Media Library /wp-admin/upload.php3.29 ▲0.0638.53 ▲2.11
SM YouTube Subscribe /wp-admin/options-general.php?page=sm-youtube-subscribe3.2630.52

Server storage [IO: ▲0.01MB] [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
theysaidso_admin_options
widget_smyoutubesubscribe_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

YouTube Subscribe: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.67 ▼0.751.51 ▼0.2643.99 ▼0.03
Dashboard /wp-admin2,207 ▲195.90 ▲0.99100.43 ▼20.0939.32 ▼10.24
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0540.29 ▲5.5034.17 ▲0.13
Add New Post /wp-admin/post-new.php1,536 ▲2223.30 ▲5.71622.42 ▲3.7651.42 ▲5.39
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.06100.07 ▲0.1241.68 ▼2.06
SM YouTube Subscribe /wp-admin/options-general.php?page=sm-youtube-subscribe8302.0223.9129.38

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 did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_smyoutubesubscribe_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
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/easy-youtube-subscribe/easy-youtube-subscribe.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/easy-youtube-subscribe/includes/sm-youtube-subscription-shortcode.php:216

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: subscribe, widget, youtube, share, shortcode

easy-youtube-subscribe/easy-youtube-subscribe.php Passed 13 tests

"YouTube Subscribe" version 3.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Youtube channel subscribe plugin for wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin254 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25567254

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin