84% back-to-top-scroll

Code Review | Back to top scroll

WordPress plugin Back to top scroll scored84%from 54 tests.

About plugin

  • Plugin page: back-to-top-scroll
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.3
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: Feb 6, 2018
  • Number of updates: 4
  • Update frequency: every 176.0 days
  • Top authors: ganeshpaygude (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,090 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Back to top scroll
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.24 ▼1.76
Dashboard /wp-admin3.31 ▼0.0350.80 ▼15.01
Posts /wp-admin/edit.php3.36 ▲0.0151.14 ▲0.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.78 ▼16.88
Media Library /wp-admin/upload.php3.24 ▲0.0138.21 ▲2.15

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

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

Browser metrics Passed 4 tests

Back to top scroll: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲17613.40 ▼0.929.27 ▲7.6244.75 ▲0.02
Dashboard /wp-admin2,195 ▲175.58 ▼0.1589.28 ▼20.5188.55 ▲46.51
Posts /wp-admin/edit.php2,115 ▲151.98 ▼0.0635.42 ▼2.7732.94 ▲0.44
Add New Post /wp-admin/post-new.php1,553 ▲2223.36 ▲0.28749.21 ▲84.5659.27 ▲6.06
Media Library /wp-admin/upload.php1,415 ▲154.32 ▲0.12111.53 ▲11.2380.39 ▲34.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× 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/back-to-top-scroll/index.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: top, link, scrolltop, backtotop, scroll

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

The entry point to "Back to top scroll" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("back-to-top-scroll.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin77 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162354
JavaScript11015
CSS1208

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions8
▷ Named functions8100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/link.png1.07KB1.49KB0.00%
images/btt-image.png6.16KB3.17KB▼ 48.49%