78% sticky-on-scroll

Code Review | Sticky on Scroll

WordPress plugin Sticky on Scroll scored78%from 54 tests.

About plugin

  • Plugin page: sticky-on-scroll
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 6, 2017
  • Latest release: Sep 13, 2017
  • Number of updates: 4
  • Update frequency: every 6.0 days
  • Top authors: latifpala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,869 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.94ms] Passed 4 tests

Analyzing server-side resources used by Sticky on Scroll
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0131.95 ▼10.14
Dashboard /wp-admin3.31 ▲0.0143.82 ▼4.66
Posts /wp-admin/edit.php3.36 ▲0.0146.08 ▲3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0177.79 ▼16.83
Media Library /wp-admin/upload.php3.23 ▲0.0130.92 ▼4.13
Sticky on Scroll /wp-admin/options-general.php?page=stsc_register_options_page3.1825.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
stsc_Elements
can_compress_scripts
stsc_min_screen
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Sticky on Scroll
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.87 ▼0.548.64 ▲6.8442.84 ▼1.54
Dashboard /wp-admin2,212 ▲245.86 ▲0.97110.12 ▼11.2343.18 ▲0.26
Posts /wp-admin/edit.php2,095 ▲92.01 ▼0.0140.79 ▲2.7934.65 ▲0.93
Add New Post /wp-admin/post-new.php1,533 ▲423.14 ▼0.01660.17 ▲36.7455.31 ▲2.66
Media Library /wp-admin/upload.php1,394 ▲34.21 ▼0.0495.05 ▼3.1340.24 ▼2.27
Sticky on Scroll /wp-admin/options-general.php?page=stsc_register_options_page8052.1834.5031.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=stsc_register_options_page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=stsc_register_options_page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-on-scroll/admin/stsc-admin-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sticky-on-scroll/sticky-on-scroll.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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: sticky, header, navigation, sticky header, menu...

sticky-on-scroll/sticky-on-scroll.php 85% from 13 tests

The entry point to "Sticky on Scroll" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 164 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
Everything looks great! No dangerous files found in this plugin120 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP216862
JavaScript2172051
CSS1007

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.00
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png43.84KB19.84KB▼ 54.75%