83% rrf-scroll-to-top

Code Review | RRF Scroll to top

WordPress plugin RRF Scroll to top scored83%from 54 tests.

About plugin

  • Plugin page: rrf-scroll-to-top
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 18, 2013
  • Latest release: May 18, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: raselahmed7 (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

300+ active /7,071 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by RRF Scroll to top
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.54 ▼4.85
Dashboard /wp-admin3.31 ▲0.0150.29 ▲1.48
Posts /wp-admin/edit.php3.36 ▲0.0150.08 ▲2.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.64 ▲3.51
Media Library /wp-admin/upload.php3.23 ▲0.0136.36 ▲1.28

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for RRF Scroll to top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14513.70 ▼0.675.43 ▲2.9441.00 ▼6.04
Dashboard /wp-admin2,207 ▲225.81 ▼0.0399.66 ▼1.4338.72 ▼2.92
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0340.63 ▼1.1035.14 ▼2.28
Add New Post /wp-admin/post-new.php1,521 ▲723.06 ▲5.36686.95 ▼1.0971.71 ▲9.25
Media Library /wp-admin/upload.php1,398 ▲104.29 ▲0.0997.73 ▼14.6644.19 ▼3.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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/rrf-scroll-to-top/plugin-hook.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Scroll to top arrow on bottom right)
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

rrf-scroll-to-top/plugin-hook.php 92% from 13 tests

The entry point to "RRF Scroll to top" version 1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rrf-scroll-to-top.php" instead of "plugin-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin33 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP151221
CSS1008
JavaScript28234

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.12KB11.36KB▼ 58.10%
css/img/top.png1.71KB0.69KB▼ 59.35%