83% sb-scroll-to-top

Code Review | SB Scroll To Top

WordPress plugin SB Scroll To Top scored83%from 54 tests.

About plugin

  • Plugin page: sb-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Oct 4, 2017
  • Latest release: Oct 4, 2017
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: shathib1812 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 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 gracefully, with no errors

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

Analyzing server-side resources used by SB Scroll To Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.28 ▼3.88
Dashboard /wp-admin3.31 ▼0.0348.59 ▼13.82
Posts /wp-admin/edit.php3.36 ▲0.0141.71 ▲0.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.56 ▼13.20
Media Library /wp-admin/upload.php3.23 ▲0.0133.10 ▲1.64

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by SB Scroll To Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲12613.45 ▼1.048.21 ▲6.3243.90 ▼0.17
Dashboard /wp-admin2,213 ▲365.54 ▼0.0585.21 ▼5.8937.40 ▼5.93
Posts /wp-admin/edit.php2,118 ▲182.01 ▲0.0035.98 ▼5.2229.57 ▼9.44
Add New Post /wp-admin/post-new.php1,563 ▲2823.32 ▲4.89586.77 ▼45.5461.65 ▼9.00
Media Library /wp-admin/upload.php1,418 ▲154.16 ▼0.14109.24 ▲5.7646.85 ▲4.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sb-scroll-to-top/index.php:16

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (SB scroll to top button on bootom right in all pagese of your site.), #2 (Section to change SB scroll to top in Customize.), #3 (change SB scroll to top button background color and button background hover color)
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

sb-scroll-to-top/index.php 92% from 13 tests

The main file in "SB Scroll To Top" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sb-scroll-to-top.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,779 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP1311064
JavaScript26026
CSS21318

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot_3.png34.74KB16.50KB▼ 52.52%
Screenshot_2.png46.41KB23.41KB▼ 49.56%
Screenshot_1.png23.69KB9.60KB▼ 59.46%