84% ytsubscribe

Code Review | ytSubscribe - Youtube Subscribe Button

WordPress plugin ytSubscribe - Youtube Subscribe Button scored84%from 54 tests.

About plugin

  • Plugin page: ytsubscribe
  • Plugin version: 2016.10.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.6
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Oct 2, 2016
  • Number of updates: 46
  • Update frequency: every 3.5 days
  • Top authors: mycodingtricks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,811 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: ▼1.44ms] Passed 4 tests

This is a short check of server-side resources used by ytSubscribe - Youtube Subscribe Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.23 ▲3.90
Dashboard /wp-admin3.31 ▲0.0150.32 ▼2.97
Posts /wp-admin/edit.php3.37 ▲0.0153.56 ▲2.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.40 ▼9.08
Media Library /wp-admin/upload.php3.24 ▲0.0139.68 ▲6.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ytSubscribe - Youtube Subscribe Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲13213.63 ▼0.9015.60 ▲14.0041.90 ▲0.42
Dashboard /wp-admin2,206 ▲325.68 ▲0.0394.52 ▲1.2274.88 ▲32.82
Posts /wp-admin/edit.php2,108 ▲51.99 ▼0.0440.47 ▼1.1638.37 ▼6.16
Add New Post /wp-admin/post-new.php1,551 ▲2522.95 ▲0.10717.76 ▲56.2371.84 ▲19.19
Media Library /wp-admin/upload.php1,408 ▲84.22 ▲0.0699.23 ▼6.4281.51 ▲37.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× 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/ytsubscribe/admin/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ytsubscribe/admin/index.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
6 plugin tags: video, post, youtube subscribe button, youtube video, post format...

ytsubscribe/index.php 85% from 13 tests

"ytSubscribe - Youtube Subscribe Button" version 2016.10.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ytsubscribe.php" instead of "index.php")

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

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions7
▷ Named functions7100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/icon.png1.32KB1.32KB0.00%