10% suggestion-toolkit-youtube

Code Review | Suggestion Toolkit - Youtube

WordPress plugin Suggestion Toolkit - Youtube scored 10% from 54 tests.

About plugin

  • Plugin page: suggestion-toolki...
  • Plugin version: 5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: May 9, 2021
  • Latest release: Aug 21, 2022
  • Number of updates: 8
  • Update frequency: every 59.0 days
  • Top authors: dzysyak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 345 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/suggestion-toolkit/index.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.73ms] Passed 4 tests

A check of server-side resources used by Suggestion Toolkit - Youtube
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.19 ▼9.50
Dashboard /wp-admin3.31 ▲0.0045.56 ▼3.19
Posts /wp-admin/edit.php3.36 ▲0.0047.48 ▼1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.95 ▼18.61
Media Library /wp-admin/upload.php3.23 ▲0.0033.94 ▼3.60

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

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

Browser metrics Passed 4 tests

Suggestion Toolkit - Youtube: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.071.67 ▼0.2642.17 ▼9.17
Dashboard /wp-admin2,203 ▲155.81 ▼0.1096.47 ▼11.4747.06 ▲6.84
Posts /wp-admin/edit.php2,092 ▼01.97 ▼0.0638.44 ▼2.0234.60 ▲0.44
Add New Post /wp-admin/post-new.php1,520 ▼2223.32 ▲5.14655.88 ▼0.5056.94 ▼28.65
Media Library /wp-admin/upload.php1,391 ▼04.32 ▲0.1093.43 ▼1.6044.74 ▲2.75

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/suggestion-toolkit-youtube/index.php
    • > /wp-content/plugins/suggestion-toolkit-youtube/styles/html.youtube.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: r_posts in wp-content/plugins/suggestion-toolkit-youtube/styles/tpl.youtube.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/suggestion-toolkit-youtube/styles/tpl.youtube.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #4 (Suggested YouTube video opened in a modal widow.)
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

suggestion-toolkit-youtube/index.php 92% from 13 tests

Analyzing the main PHP file in "Suggestion Toolkit - Youtube" version 5.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("suggestion-toolkit-youtube.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin277 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36364202
CSS18057
JavaScript14017
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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 files were detected