74% cute-scroll-to-top

Code Review | Cute Scroll To Top

WordPress plugin Cute Scroll To Top scored 74% from 54 tests.

About plugin

  • Plugin page: cute-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Jul 3, 2014
  • Latest release: Jul 3, 2014
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: arnabkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,118 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.69ms] Passed 4 tests

This is a short check of server-side resources used by Cute Scroll To Top
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.414.97 ▼34.46
Dashboard /wp-admin2.06 ▼1.247.16 ▼39.84
Posts /wp-admin/edit.php2.07 ▼1.295.66 ▼44.21
Add New Post /wp-admin/post-new.php2.06 ▼3.826.29 ▼96.23
Media Library /wp-admin/upload.php2.06 ▼1.165.87 ▼28.06

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Cute Scroll To Top: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲22013.80 ▼0.459.82 ▲8.1940.73 ▼11.36
Dashboard /wp-admin2,226 ▲384.92 ▼0.90112.04 ▼2.5438.28 ▼4.90
Posts /wp-admin/edit.php2,109 ▲202.06 ▲0.0041.31 ▲1.7136.78 ▼3.05
Add New Post /wp-admin/post-new.php1,526 ▲1223.34 ▲5.84669.08 ▲52.3361.10 ▲12.22
Media Library /wp-admin/upload.php1,408 ▲174.22 ▼0.0498.87 ▼2.1242.47 ▼2.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cute-scroll-to-top-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cute-scroll-to-top/cute-scroll-to-top.php:18

User-side errors Passed 1 test

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


Plugin configuration 97% 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 require attention:
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

cute-scroll-to-top/cute-scroll-to-top.php Passed 13 tests

The main PHP script in "Cute Scroll To Top" version 1.0 is automatically included on every request by WordPress
60 characters long description:
This plugin will add a scroll to top button on footer right.

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
No dangerous file extensions were detected214 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of 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.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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
1 PNG file occupies 0.05MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ui.totop.png51.59KB1.82KB▼ 96.47%