84% ultimate-scroll-to-top-button

Code Review | Binary Carpenter Ultimate Scroll To Top Button

WordPress plugin Binary Carpenter Ultimate Scroll To Top Button scored84%from 54 tests.

About plugin

  • Plugin page: ultimate-scroll-t...
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 17, 2018
  • Latest release: Oct 17, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bc2018 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.14ms] Passed 4 tests

A check of server-side resources used by Binary Carpenter Ultimate Scroll To Top Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.61 ▲2.39
Dashboard /wp-admin3.35 ▲0.0549.42 ▼2.64
Posts /wp-admin/edit.php3.47 ▲0.1158.01 ▲7.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.10 ▲0.69
Media Library /wp-admin/upload.php3.25 ▲0.0238.57 ▲0.13

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

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

Browser metrics Passed 4 tests

Binary Carpenter Ultimate Scroll To Top Button: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,230 ▲48415.64 ▲1.275.49 ▲3.7029.48 ▼10.92
Dashboard /wp-admin2,555 ▲3676.81 ▲1.92143.75 ▲29.8644.92 ▲0.50
Posts /wp-admin/edit.php2,428 ▲3423.82 ▲1.8262.23 ▲24.6137.50 ▲3.75
Add New Post /wp-admin/post-new.php1,541 ▲2223.70 ▲0.35643.65 ▼51.4737.79 ▼19.44
Media Library /wp-admin/upload.php1,632 ▲2414.57 ▲0.3583.70 ▼27.2245.02 ▼2.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 3× 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/ultimate-scroll-to-top-button/functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-scroll-to-top-button/functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-scroll-to-top-button/ui/main-ui.php:8

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: scroll to top

ultimate-scroll-to-top-button/index.php 92% from 13 tests

This is the main PHP file of "Binary Carpenter Ultimate Scroll To Top Button" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ultimate-scroll-to-top-button.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected9,660 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,7193464,547
SVG2002,688
JavaScript22876212,243
PHP55224118
Sass212064

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bundle/css/images/next_button.png16.98KB1.68KB▼ 90.09%
bundle/images/presets/preset-placeholder.png17.10KB1.62KB▼ 90.52%
bundle/css/images/owl.video.play.png4.86KB2.74KB▼ 43.61%
bundle/css/images/prev_button.png17.01KB1.70KB▼ 90.00%