77% yt-channel-subscribe

Code Review | Channel Subscribe - YouTube

WordPress plugin Channel Subscribe - YouTube scored77%from 54 tests.

About plugin

  • Plugin page: yt-channel-subscribe
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.4
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: Jun 3, 2020
  • Number of updates: 10
  • Update frequency: every 1.5 days
  • Top authors: avthemes1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.90ms] Passed 4 tests

Analyzing server-side resources used by Channel Subscribe - YouTube
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1137.91 ▼3.52
Dashboard /wp-admin3.41 ▲0.0646.23 ▼13.14
Posts /wp-admin/edit.php3.53 ▲0.1749.65 ▲7.59
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.44 ▼8.70
Media Library /wp-admin/upload.php3.34 ▲0.1034.18 ▼2.24
Channel Subscribe /wp-admin/options-general.php?page=AV_YT_plugin_options3.3732.96

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 84 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
AV_YT_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_av_subscribe__channel_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Channel Subscribe - YouTube
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲19613.81 ▼0.649.09 ▲6.9639.21 ▼4.09
Dashboard /wp-admin2,213 ▲254.89 ▼0.0298.51 ▼14.2539.23 ▼6.66
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0241.76 ▲6.2835.02 ▼2.21
Add New Post /wp-admin/post-new.php1,537 ▲423.24 ▲0.09653.21 ▼5.7853.33 ▼1.98
Media Library /wp-admin/upload.php1,389 ▲14.31 ▲0.09101.94 ▼4.6043.73 ▼0.70
Channel Subscribe /wp-admin/options-general.php?page=AV_YT_plugin_options1,93015.36407.1281.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • AV_YT_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_av_subscribe__channel_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/yt-channel-subscribe/trunk/includes/admin/tpl/av-plugins-main.php
    • > /wp-content/plugins/yt-channel-subscribe/includes/admin/tpl/av-plugins-main.php
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: is_dismissible in wp-content/plugins/yt-channel-subscribe/trunk/includes/admin/tpl/admin_notice.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yt-channel-subscribe/trunk/includes/front/tpl/yt-subscribe.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yt-channel-subscribe/trunk/index.php:35
    • > PHP Notice
      Undefined variable: notice_type in wp-content/plugins/yt-channel-subscribe/includes/admin/tpl/admin_notice.php on line 6
    • > PHP Notice
      Undefined variable: is_dismissible in wp-content/plugins/yt-channel-subscribe/includes/admin/tpl/admin_notice.php on line 6
    • > PHP Notice
      Undefined variable: notice_type in wp-content/plugins/yt-channel-subscribe/trunk/includes/admin/tpl/admin_notice.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/yt-channel-subscribe/includes/admin/tpl/admin_notice.php:7
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/yt-channel-subscribe/includes/admin/tpl/av-plugins-main.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/yt-channel-subscribe/trunk/includes/widgets/tpl/sidebar-form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yt-channel-subscribe/index.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: youtube subscribe, youtube channel, video marketing, youtube

yt-channel-subscribe/index.php 69% from 13 tests

"Channel Subscribe - YouTube" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/plugin/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yt-channel-subscribe.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,758 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP20242248815
SVG777729
CSS204141
JavaScript3271073

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
16 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/assets/images/av_icon_16.png0.60KB0.77KB0.00%
trunk/assets/images/av_icon_128.png8.71KB4.30KB▼ 50.68%
assets/images/av_icon_256.png8.87KB4.36KB▼ 50.88%
assets/images/av_icon_64.png2.30KB1.94KB▼ 15.68%
assets/images/cover.png19.61KB8.12KB▼ 58.60%