83% subscribe-youtube-button

Code Review | Subscribe-YouTube-Button

WordPress plugin Subscribe-YouTube-Button scored 83% from 54 tests.

About plugin

  • Plugin page: subscribe-youtube...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Mar 13, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: arqurashi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 607 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: ▼4.13ms] Passed 4 tests

Analyzing server-side resources used by Subscribe-YouTube-Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.76 ▼13.17
Dashboard /wp-admin3.32 ▲0.0146.42 ▼2.04
Posts /wp-admin/edit.php3.37 ▲0.0146.09 ▲0.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.48 ▼1.54
Media Library /wp-admin/upload.php3.24 ▲0.0137.13 ▲5.29

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_ytsbtn_widget
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subscribe-YouTube-Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.36 ▼1.085.90 ▲3.5636.91 ▼14.34
Dashboard /wp-admin2,206 ▲214.84 ▼1.06113.65 ▲1.7446.05 ▲0.55
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0034.30 ▼4.2233.32 ▼1.23
Add New Post /wp-admin/post-new.php1,514 ▼1917.67 ▼5.81720.77 ▲71.9366.28 ▲0.47
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.1097.23 ▲3.3042.75 ▲0.84

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_ytsbtn_widget

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
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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subscribe-youtube-button/include/ytsbtn-scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/subscribe-youtube-button/include/ytsbtn-class.php:5

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: subscribe, button, youtube, youtube button, widget...

subscribe-youtube-button/ytsbtn.php 69% from 13 tests

The principal PHP file in "Subscribe-YouTube-Button" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("subscribe-youtube-button.php" instead of "ytsbtn.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected111 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4846111

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin