83% scroll-to-top-one

Code Review | Scroll To Top One

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

About plugin

  • Plugin page: scroll-to-top-one
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2016
  • Latest release: Jul 7, 2016
  • Number of updates: 10
  • Update frequency: every 2.9 days
  • Top authors: rootabout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 total downloads

Benchmarks

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.32ms] Passed 4 tests

Server-side resources used by Scroll To Top One
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.90 ▼4.16
Dashboard /wp-admin3.33 ▼0.0245.57 ▼16.67
Posts /wp-admin/edit.php3.38 ▲0.0248.28 ▼0.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.61 ▼11.48
Media Library /wp-admin/upload.php3.25 ▲0.0234.93 ▲0.56

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

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

Browser metrics Passed 4 tests

Scroll To Top One: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.19 ▼1.203.41 ▲1.6447.63 ▲9.20
Dashboard /wp-admin2,223 ▲354.88 ▼1.13107.10 ▼8.3744.82 ▼1.95
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0541.29 ▲7.0234.39 ▼0.42
Add New Post /wp-admin/post-new.php1,545 ▲3123.12 ▲5.56640.93 ▼40.7753.42 ▼14.52
Media Library /wp-admin/upload.php1,405 ▲174.22 ▼0.0297.58 ▼10.9745.42 ▼0.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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

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
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-to-top-one/scroll-to-top-one.php on line 18
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/scroll-to-top-one/abExport.php on line 3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/scroll-to-top-one/abExport.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-to-top-one/abExport.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/scroll-to-top-one/abExport.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/scroll-to-top-one/scroll-to-top-one.php on line 18
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/scroll-to-top-one/scroll-to-top-one.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (General details page)
The official readme.txt is a good inspiration

scroll-to-top-one/scroll-to-top-one.php 85% from 13 tests

"Scroll To Top One" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected120 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2171197
CSS10016
JavaScript1107

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/0-32x32.png0.51KB0.48KB▼ 6.11%
screenshot-1.png72.48KB21.18KB▼ 70.77%
img/0-20x20.png0.34KB0.33KB▼ 3.18%
img/0-64x64.png0.93KB0.79KB▼ 14.54%
img/0-48x48.png0.69KB0.66KB▼ 5.36%