10% scroll-to-top-inthiscode

Code Review | Scroll To Top Plugin by InThisCode

WordPress plugin Scroll To Top Plugin by InThisCode scored10%from 54 tests.

About plugin

  • Plugin page: scroll-to-top-int...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Oct 21, 2017
  • Latest release: Jul 7, 2020
  • Number of updates: 14
  • Update frequency: every 70.8 days
  • Top authors: inthiscode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,146 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/scroll-to-top-inthiscode/scroll-to-top-inthiscode.php+34
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼50.85ms] Passed 4 tests

An overview of server-side resources used by Scroll To Top Plugin by InThisCode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.335.68 ▼39.38
Dashboard /wp-admin2.16 ▼1.156.68 ▼44.82
Posts /wp-admin/edit.php2.16 ▼1.207.69 ▼39.17
Add New Post /wp-admin/post-new.php2.16 ▼3.737.41 ▼80.03
Media Library /wp-admin/upload.php2.16 ▼1.086.67 ▼25.46

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Scroll To Top Plugin by InThisCode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.45 ▲0.191.74 ▼0.0944.78 ▼4.52
Dashboard /wp-admin2,222 ▲485.84 ▼0.02100.18 ▼11.1740.70 ▼5.58
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0340.36 ▲1.8735.07 ▲1.80
Add New Post /wp-admin/post-new.php1,553 ▲2323.01 ▼0.21658.13 ▼31.0756.30 ▼5.87
Media Library /wp-admin/upload.php1,407 ▲194.15 ▼0.0498.08 ▼11.8343.97 ▼1.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/scroll-to-top-inthiscode/scroll-to-top-inthiscode.php+34
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/scroll-to-top-inthiscode/scroll-to-top-inthiscode.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-init.php:2
    • > PHP Notice
      Undefined variable: itct_options in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 4
    • > PHP Notice
      Undefined variable: itct_options in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-callbacks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php:53
    • > PHP Notice
      Undefined variable: itct_options in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 3
    • > PHP Notice
      Undefined variable: itct_options in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/scroll-to-top-inthiscode/includes/itct-scroll-to-top-settings-filters.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt might help

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

The principal PHP file in "Scroll To Top Plugin by InThisCode" v. 1.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin379 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP57170370
JavaScript31226
CSS3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions35
▷ Named functions35100.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
34 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/1.png0.84KB0.64KB▼ 24.13%
images/icons/34.png5.39KB2.36KB▼ 56.23%
images/icons/25.png3.12KB2.10KB▼ 32.79%
images/icons/16.png8.33KB3.09KB▼ 62.94%
images/icons/22.png2.82KB2.48KB▼ 11.79%