84% yt-subscribe-link-locker

Code Review | Youtube Subscribe Link Locker

WordPress plugin Youtube Subscribe Link Locker scored84%from 54 tests.

About plugin

  • Plugin page: yt-subscribe-link...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: May 27, 2017
  • Latest release: Jun 11, 2017
  • Number of updates: 7
  • Update frequency: every 3.9 days
  • Top authors: jasminderpalsingh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.35ms] Passed 4 tests

This is a short check of server-side resources used by Youtube Subscribe Link Locker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0151.03 ▲10.86
Dashboard /wp-admin3.32 ▲0.0252.65 ▼1.78
Posts /wp-admin/edit.php3.37 ▲0.0150.20 ▼1.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.32 ▼14.24
Media Library /wp-admin/upload.php3.25 ▲0.0135.59 ▲0.41
Youtube Subscribe Link Locker /wp-admin/options-general.php?page=ytsll_settings3.2130.29

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Youtube Subscribe Link Locker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.76 ▼0.808.84 ▲6.9643.92 ▼7.40
Dashboard /wp-admin2,204 ▲245.59 ▼0.0395.56 ▲7.6042.56 ▼2.09
Posts /wp-admin/edit.php2,106 ▲31.98 ▼0.0234.82 ▼6.9836.10 ▲0.91
Add New Post /wp-admin/post-new.php1,531 ▲523.55 ▲0.40624.45 ▼35.8350.78 ▼18.09
Media Library /wp-admin/upload.php1,403 ▼04.22 ▼0.06104.59 ▲0.9146.08 ▲1.20
Youtube Subscribe Link Locker /wp-admin/options-general.php?page=ytsll_settings7892.1523.4442.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yt-subscribe-link-locker/yt-subscribe-link-locker.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: youtube subscribers, youtube, subscribe, link locker

yt-subscribe-link-locker/yt-subscribe-link-locker.php Passed 13 tests

"Youtube Subscribe Link Locker" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
Convert each downloader of your content into a youtube channel subscriber in a most genuine way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin67 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP119849
CSS22212
JavaScript1016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png7.21KB2.54KB▼ 64.79%