57% scroll-triggered-widget-area

Code Review | Scroll Triggered Widget Area

WordPress plugin Scroll Triggered Widget Area scored 57% from 54 tests.

About plugin

  • Plugin page: scroll-triggered-...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.7.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2014
  • Latest release: Apr 25, 2021
  • Number of updates: 10
  • Update frequency: every 262.8 days
  • Top authors: logeshmba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,990 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.79MB] [CPU: ▼59.99ms] Passed 4 tests

An overview of server-side resources used by Scroll Triggered Widget Area
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.376.73 ▼44.70
Dashboard /wp-admin2.26 ▼1.058.33 ▼66.85
Posts /wp-admin/edit.php2.26 ▼1.108.36 ▼43.35
Add New Post /wp-admin/post-new.php2.26 ▼3.636.40 ▼85.07
Media Library /wp-admin/upload.php2.26 ▼0.977.46 ▼22.42
Scroll Triggered Widget Area /wp-admin/options-general.php?page=scroll-triggered-widget-area2.267.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
stwa_settings
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Scroll Triggered Widget Area
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲20913.82 ▼0.5610.79 ▲9.0757.28 ▲15.44
Dashboard /wp-admin2,233 ▲485.00 ▼0.82135.91 ▲16.8255.68 ▲5.80
Posts /wp-admin/edit.php2,135 ▲462.42 ▲0.3540.84 ▲2.4159.90 ▲26.15
Add New Post /wp-admin/post-new.php1,539 ▲1123.19 ▲0.031,120.27 ▲319.1149.78 ▼6.05
Media Library /wp-admin/upload.php1,425 ▲374.40 ▲0.08138.84 ▲29.8864.75 ▼1.59
Scroll Triggered Widget Area /wp-admin/options-general.php?page=scroll-triggered-widget-area1,5062.9873.0133.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stwa_stylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • stwa_settings
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=scroll-triggered-widget-area
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stwa_stylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=scroll-triggered-widget-area
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stwa_stylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=scroll-triggered-widget-area
    • > User notice in wp-includes/functions.php+5905
    Function is_feed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=scroll-triggered-widget-area
    • > Notice in wp-content/plugins/scroll-triggered-widget-area/public/includes/stwa-stylesheet.php+24
    Undefined index: stwa_content_color

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/scroll-triggered-widget-area/public/includes/stwa-stylesheet.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/scroll-triggered-widget-area/admin/views/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/scroll-triggered-widget-area/public/views/public.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=scroll-triggered-widget-area
    • > Network (severe)
    wp-content/plugins/scroll-triggered-widget-area/admin/my-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: widget area, animation, popup, scroll triggered

scroll-triggered-widget-area/scroll-triggered-widget-area.php Passed 13 tests

This is the main PHP file of "Scroll Triggered Widget Area" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
91 characters long description:
A simple plugin which triggers a widget area in the footer with stunning animation options.

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
Good job! No executable or dangerous file extensions detected926 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP9215275791
JavaScript3242192
CSS38843

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.33
▷ Minimum class complexity6.00
▷ Maximum class complexity44.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods47
▷ Static methods714.89%
▷ Public methods4289.36%
▷ Protected methods00.00%
▷ Private methods510.64%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/arrow_right.png2.22KB1.01KB▼ 54.44%
public/assets/images/arrow_left.png2.25KB1.01KB▼ 55.18%