84% scroll-me-up-button

Code Review | Scroll Me Up Button

WordPress plugin Scroll Me Up Button scored84%from 54 tests.

About plugin

  • Plugin page: scroll-me-up-button
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2023
  • Latest release: Feb 17, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: iamraju (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /358 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.14ms] Passed 4 tests

This is a short check of server-side resources used by Scroll Me Up Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.70 ▼0.78
Dashboard /wp-admin3.35 ▲0.0046.74 ▼13.39
Posts /wp-admin/edit.php3.46 ▲0.1048.77 ▲5.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0478.05 ▼19.05
Media Library /wp-admin/upload.php3.27 ▲0.0434.70 ▲0.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Scroll Me Up Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.26 ▼1.494.66 ▲3.0341.10 ▲0.66
Dashboard /wp-admin2,234 ▲494.93 ▲0.0296.80 ▼3.1264.48 ▲19.43
Posts /wp-admin/edit.php2,120 ▲311.98 ▼0.1637.81 ▼1.1733.30 ▼6.32
Add New Post /wp-admin/post-new.php1,543 ▲2918.47 ▲0.90728.86 ▲60.8560.84 ▲17.80
Media Library /wp-admin/upload.php1,410 ▲194.22 ▲0.0694.40 ▼1.4166.68 ▲23.07

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • scrollmeup_settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/scroll-me-up-button/backend/templates/views/icons.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/scroll-me-up-button/backend/api/update_settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/scroll-me-up-button/backend/templates/views/position.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/scroll-me-up-button/backend/templates/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/scroll-me-up-button/backend/templates/views/advance.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/scroll-me-up-button/frontend/templates/views/switch.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/scroll-me-up-button/frontend/templates/client_script.php:1

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: scroll me up, button, scroll to top, to top, back to top

scroll-me-up-button/scroll-me-up-button.php 85% from 13 tests

"Scroll Me Up Button" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin891 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP149120452
CSS22512322
JavaScript212482
SVG210035

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG files were detected