89% native-youtube-subscribe-button-with-subscriber-counter

Code Review | Native YouTube Subscribe Button with Subscriber Counter

WordPress plugin Native YouTube Subscribe Button with Subscriber Counter scored89%from 54 tests.

About plugin

  • Plugin page: native-youtube-su...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Jan 30, 2018
  • Latest release: Jan 30, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: gchoyal1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /919 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: ▼6.62ms] Passed 4 tests

Server-side resources used by Native YouTube Subscribe Button with Subscriber Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.88 ▼2.19
Dashboard /wp-admin3.31 ▲0.0146.75 ▼6.77
Posts /wp-admin/edit.php3.36 ▲0.0142.96 ▼5.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.30 ▼12.47
Media Library /wp-admin/upload.php3.24 ▲0.0142.58 ▲6.28

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Native YouTube Subscribe Button with Subscriber Counter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.40 ▲0.262.03 ▲0.1838.86 ▲1.94
Dashboard /wp-admin2,209 ▲215.85 ▲0.96109.69 ▲5.5542.11 ▼0.16
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0237.42 ▼0.6630.45 ▼6.16
Add New Post /wp-admin/post-new.php1,530 ▲1123.30 ▲0.22671.56 ▲51.3852.81 ▼17.79
Media Library /wp-admin/upload.php1,391 ▲34.23 ▼0.04115.24 ▲7.1547.85 ▲3.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

native-youtube-subscribe-button-with-subscriber-counter/plugin.php 85% from 13 tests

The main file in "Native YouTube Subscribe Button with Subscriber Counter" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("native-youtube-subscribe-button-with-subscriber-counter.php" instead of "plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 384 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112838

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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