78% ouzayyts

Code Review | YTS Youtube Subs

WordPress plugin YTS Youtube Subs scored78%from 54 tests.

About plugin

  • Plugin page: ouzayyts
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: May 6, 2020
  • Latest release: May 6, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ouzay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.68ms] Passed 4 tests

A check of server-side resources used by YTS Youtube Subs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.69 ▼6.61
Dashboard /wp-admin3.34 ▼0.0148.47 ▼18.94
Posts /wp-admin/edit.php3.39 ▲0.0344.93 ▼6.59
Add New Post /wp-admin/post-new.php5.92 ▲0.03115.28 ▲6.02
Media Library /wp-admin/upload.php3.26 ▲0.0238.34 ▲1.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_yts_youtube_subs_widget
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by YTS Youtube Subs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.43 ▲0.176.36 ▲4.3736.59 ▼7.30
Dashboard /wp-admin2,198 ▲215.66 ▲0.1284.61 ▼5.0135.85 ▼8.58
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0339.19 ▲4.0734.80 ▼5.23
Add New Post /wp-admin/post-new.php1,545 ▼123.19 ▼0.35599.81 ▼75.4753.00 ▼5.32
Media Library /wp-admin/upload.php1,403 ▲34.30 ▲0.03100.19 ▼12.2042.11 ▼4.57

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_yts_youtube_subs_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ouzayyts/youtubesubs.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ouzayyts/includes/youtubesubs-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ouzayyts/includes/youtubesubs-scripts.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: button, youtube, subscribe

ouzayyts/youtubesubs.php 92% from 13 tests

The principal PHP file in "YTS Youtube Subs" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ouzayyts.php" instead of "youtubesubs.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
There were no executable files found in this plugin95 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3184495

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.27
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin