83% scroll-bar-with-back-to-top

Code Review | Scroll Bar With Back To Top

WordPress plugin Scroll Bar With Back To Top scored83%from 54 tests.

About plugin

  • Plugin page: scroll-bar-with-b...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Dec 27, 2015
  • Latest release: Jan 12, 2016
  • Number of updates: 9
  • Update frequency: every 1.8 days
  • Top authors: shafiqul (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /7,935 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.26ms] Passed 4 tests

A check of server-side resources used by Scroll Bar With Back To Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.44 ▼4.57
Dashboard /wp-admin3.46 ▲0.1652.07 ▼6.82
Posts /wp-admin/edit.php3.57 ▲0.2252.56 ▼0.23
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.98 ▼1.43
Media Library /wp-admin/upload.php3.36 ▲0.1335.35 ▲1.58
Scroll Settings /wp-admin/options-general.php?page=scroll_settings3.3637.32

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scroll Bar With Back To Top
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲26315.00 ▲0.633.72 ▲1.8445.70 ▲0.59
Dashboard /wp-admin2,367 ▲1796.59 ▲1.69133.72 ▲21.0341.40 ▼0.32
Posts /wp-admin/edit.php2,267 ▲1753.51 ▲1.5056.48 ▲20.3036.47 ▲3.11
Add New Post /wp-admin/post-new.php1,530 ▲1623.58 ▲6.10583.64 ▼64.1134.91 ▼25.92
Media Library /wp-admin/upload.php1,409 ▲274.38 ▲0.1880.36 ▼19.1243.19 ▼2.09
Scroll Settings /wp-admin/options-general.php?page=scroll_settings1,5743.7272.3727.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • scroll_top
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • scroll_bar
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scroll-bar-with-back-to-top/scroll-plugin.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Scroll Bar Setting Option), #2 (Scroll Back To Top Setting Option)
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can look at the official readme.txt

scroll-bar-with-back-to-top/scroll-plugin.php 92% from 13 tests

The entry point to "Scroll Bar With Back To Top" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("scroll-bar-with-back-to-top.php" instead of "scroll-plugin.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
Good job! No executable or dangerous file extensions detected734 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3110158562
JavaScript100114
CSS192037
SVG10021

PHP code Passed 2 tests

Analyzing 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.27
Average class complexity19.00
▷ Minimum class complexity3.00
▷ Maximum class complexity35.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There were not PNG files found in your plugin