84% sticky-back2top-for-genesis

Code Review | Sticky Back2Top Universal

WordPress plugin Sticky Back2Top Universal scored84%from 54 tests.

About plugin

  • Plugin page: sticky-back2top-f...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 6.3.1
  • First release: May 31, 2016
  • Latest release: Apr 29, 2019
  • Number of updates: 30
  • Update frequency: every 35.4 days
  • Top authors: mkastler (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,763 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.49ms] Passed 4 tests

Server-side resources used by Sticky Back2Top Universal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.61 ▼1.07
Dashboard /wp-admin3.34 ▲0.0448.94 ▼1.04
Posts /wp-admin/edit.php3.39 ▲0.0448.94 ▼1.72
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.20 ▼10.13
Media Library /wp-admin/upload.php3.27 ▲0.0439.72 ▲4.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sticky Back2Top Universal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18513.66 ▼0.635.91 ▲4.0442.09 ▼3.36
Dashboard /wp-admin2,221 ▲305.82 ▲0.03107.44 ▼0.0838.31 ▼3.62
Posts /wp-admin/edit.php2,110 ▲212.04 ▲0.0242.76 ▲6.9936.99 ▲5.64
Add New Post /wp-admin/post-new.php1,546 ▲1223.29 ▲0.08595.06 ▼82.5251.86 ▼0.71
Media Library /wp-admin/upload.php1,412 ▲274.16 ▼0.0895.56 ▲0.2040.79 ▼0.21

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 detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-back2top-for-genesis/sb2t-init.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/sticky-back2top-for-genesis/views/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

sticky-back2top-for-genesis/sticky-back2top.php 92% from 13 tests

"Sticky Back2Top Universal" version 2.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sticky-back2top-for-genesis.php" instead of "sticky-back2top.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin697 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP34241312
JavaScript22210196
SVG11011118
CSS110671

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.34MB with 0.18MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot.png184.31KB69.43KB▼ 62.33%
images/topunderarrow.png18.19KB12.42KB▼ 31.72%
images/demopage.png149.00KB53.95KB▼ 63.79%