10% youtube-subscriber

Code Review | YouTube Subscriber

WordPress plugin YouTube Subscriber scored10%from 54 tests.

About plugin

  • Plugin page: youtube-subscriber
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.6
  • WordPress version: 6.3.1
  • First release: Aug 12, 2014
  • Latest release: Aug 22, 2016
  • Number of updates: 19
  • Update frequency: every 39.0 days
  • Top authors: WEB4PRO_co (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /9,106 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/youtube-subscriber/youtube-subscriber.php+11
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼59.36ms] Passed 4 tests

Analyzing server-side resources used by YouTube Subscriber
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.67 ▼44.76
Dashboard /wp-admin2.12 ▼1.196.25 ▼45.32
Posts /wp-admin/edit.php2.12 ▼1.245.77 ▼49.85
Add New Post /wp-admin/post-new.php2.12 ▼3.776.81 ▼97.51
Media Library /wp-admin/upload.php2.12 ▼1.115.75 ▼32.40

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_youtube_subscriber
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for YouTube Subscriber
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.341.85 ▼0.3841.19 ▼7.37
Dashboard /wp-admin2,195 ▲215.58 ▼0.0693.35 ▼9.1042.72 ▼2.37
Posts /wp-admin/edit.php2,097 ▲152.01 ▲0.0139.47 ▲4.2935.96 ▼0.07
Add New Post /wp-admin/post-new.php1,528 ▼223.18 ▼0.04621.71 ▼51.5047.06 ▼4.00
Media Library /wp-admin/upload.php1,397 ▼04.16 ▼0.0598.26 ▼3.1443.70 ▲1.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/youtube-subscriber/youtube-subscriber.php+11
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_youtube_subscriber
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/youtube-subscriber/shortcodes.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-subscriber/youtube-subscriber.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: youtube, share, subscribing

youtube-subscriber/youtube-subscriber.php Passed 13 tests

Analyzing the main PHP file in "YouTube Subscriber" version 2.0
65 characters long description:
Create widget with form or button to subscribe to YouTube channel

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
Success! There were no dangerous files found in this plugin267 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22036196
JavaScript14071

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/official-youtube-logo-tile_25x25.png0.68KB0.69KB0.00%