83% basic-scroll-to-top

Code Review | Basic Scroll to Top

WordPress plugin Basic Scroll to Top scored 83% from 54 tests.

About plugin

  • Plugin page: basic-scroll-to-top
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 15, 2022
  • Latest release: Mar 15, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Arpit Patel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 327 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Basic Scroll to Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0628.24 ▼9.90
Dashboard /wp-admin3.34 ▲0.0448.24 ▲0.19
Posts /wp-admin/edit.php3.40 ▲0.0444.41 ▼2.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.72 ▼21.20
Media Library /wp-admin/upload.php3.27 ▲0.0436.15 ▲3.94
Scroll to Top /wp-admin/options-general.php?page=basicscrolltop3.2738.15

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Basic Scroll to Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.20 ▼1.171.87 ▲0.0242.65 ▼8.81
Dashboard /wp-admin2,215 ▲304.80 ▼1.08107.79 ▲9.3641.49 ▼0.58
Posts /wp-admin/edit.php2,096 ▲42.01 ▼0.0133.45 ▼8.6534.66 ▼1.38
Add New Post /wp-admin/post-new.php1,539 ▲2023.35 ▲0.05676.15 ▲87.9054.63 ▼11.76
Media Library /wp-admin/upload.php1,395 ▲104.16 ▼0.1396.60 ▼2.0344.45 ▲0.22
Scroll to Top /wp-admin/options-general.php?page=basicscrolltop1,3413.4458.7833.55

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
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
Please fix the following items
  • 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/basic-scroll-to-top/admin/basic-scroll-top-setting.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/basic-scroll-to-top/public/basic-scroll-top-front.php:4

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: smooth scroll, wordpress scroll top, basic scroll to top, scroll up, scroll top...

basic-scroll-to-top/basic-scroll-to-top.php 77% from 13 tests

"Basic Scroll to Top" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin474 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.50
▷ Minimum class complexity16.00
▷ Maximum class complexity27.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/icon.png8.22KB3.97KB▼ 51.66%
screenshots/banner-772x250.png107.36KB68.57KB▼ 36.13%
screenshots/screenshot-1.png60.16KB16.92KB▼ 71.88%