84% sticky-youtube-video-onscroll

Code Review | Sticky Youtube Video Onscroll

WordPress plugin Sticky Youtube Video Onscroll scored84%from 54 tests.

About plugin

  • Plugin page: sticky-youtube-vi...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2021
  • Latest release: Nov 22, 2023
  • Number of updates: 7
  • Update frequency: every 127.2 days
  • Top authors: aarambhathemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /499 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.08MB] [CPU: ▼4.76ms] Passed 4 tests

Server-side resources used by Sticky Youtube Video Onscroll
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.04 ▼5.51
Dashboard /wp-admin3.40 ▲0.0546.38 ▼14.75
Posts /wp-admin/edit.php3.51 ▲0.1547.64 ▼0.30
Add New Post /wp-admin/post-new.php5.98 ▲0.1090.32 ▲6.73
Media Library /wp-admin/upload.php3.32 ▲0.0933.75 ▲1.54
Sticky Youtube Video on Scroll /wp-admin/options-general.php?page=syvos3.2933.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Sticky Youtube Video Onscroll: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8413.95 ▼0.2710.47 ▲8.6941.14 ▼3.43
Dashboard /wp-admin2,202 ▲245.59 ▼0.1291.99 ▼13.7442.91 ▲1.46
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0938.99 ▼1.6635.87 ▲0.27
Add New Post /wp-admin/post-new.php6,249 ▲4,71920.91 ▼2.18828.26 ▲236.4878.14 ▲17.51
Media Library /wp-admin/upload.php1,407 ▲44.28 ▲0.0896.66 ▼5.5744.77 ▼1.50
Sticky Youtube Video on Scroll /wp-admin/options-general.php?page=syvos8702.0124.6029.89

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sticky-youtube-video-onscroll/includes/plugin-functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sticky-youtube-video-onscroll/admin/single-page-post-options.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-youtube-video-onscroll/admin/admin-options.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Banner of the plugin.), #2 (Icon of the plugin.)
The official readme.txt might help

sticky-youtube-video-onscroll/sticky-youtube-video-onscroll.php 92% from 13 tests

Analyzing the main PHP file in "Sticky Youtube Video Onscroll" version 1.0.2
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 292 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected640 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP59584486
CSS191154
JavaScript1230

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png69.41KB33.24KB▼ 52.10%
assets/icon-256x256.png41.85KB19.42KB▼ 53.61%