84% r-scroll-up

Code Review | R Scroll Up

WordPress plugin R Scroll Up scored84%from 54 tests.

About plugin

  • Plugin page: r-scroll-up
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Sep 14, 2014
  • Number of updates: 18
  • Update frequency: every 0.3 days
  • Top authors: rasel2339 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,743 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.80ms] Passed 4 tests

An overview of server-side resources used by R Scroll Up
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0330.36 ▼6.31
Dashboard /wp-admin3.36 ▲0.0142.73 ▼14.87
Posts /wp-admin/edit.php3.48 ▲0.1247.05 ▲0.11
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.11 ▼14.12
Media Library /wp-admin/upload.php3.28 ▲0.0534.58 ▲2.65

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

R Scroll Up: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.52 ▼1.0611.41 ▲9.6942.11 ▲2.70
Dashboard /wp-admin2,214 ▲345.65 ▲0.0588.92 ▲0.6736.01 ▼9.70
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0434.77 ▼2.7732.54 ▼3.64
Add New Post /wp-admin/post-new.php1,539 ▲1323.55 ▼0.11673.31 ▼8.9653.24 ▼2.15
Media Library /wp-admin/upload.php1,416 ▲134.21 ▼0.0898.35 ▼2.4643.62 ▼1.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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)
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
Almost there! Just fix the following items
  • 2× 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/r-scroll-up/inc/settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/r-scroll-up/r-scroll-up.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

r-scroll-up/r-scroll-up.php Passed 13 tests

The principal PHP file in "R Scroll Up" v. 1.0 is loaded by WordPress automatically on each request
73 characters long description:
Scroll Up plugin is Simple wordpress plugin for scroll to top one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin375 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP27619173
JavaScript22417133
CSS44469

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions21
▷ Named functions21100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/4.png1.60KB0.66KB▼ 58.88%
img/5.png0.68KB0.69KB0.00%
img/scroll_up.png2.21KB1.27KB▼ 42.41%
img/2.png1.52KB0.69KB▼ 54.65%
img/top.png0.68KB0.69KB0.00%