10% ultimate-back-to-top

Code Review | Ultimate Back To Top Button

WordPress plugin Ultimate Back To Top Button scored 10% from 54 tests.

About plugin

  • Plugin page: ultimate-back-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-3.4.1
  • WordPress version: 5.8.1
  • First release: Jul 14, 2012
  • Latest release: Jul 14, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nyamsprod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 6,369 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.89MB] [CPU: ▼198.01ms] Passed 4 tests

A check of server-side resources used by Ultimate Back To Top Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼1.096.77 ▼20.33
Dashboard /wp-admin1.76 ▼1.304.72 ▼41.27
Posts /wp-admin/edit.php1.76 ▼1.355.56 ▼46.17
Add New Post /wp-admin/post-new.php1.76 ▼3.675.37 ▼662.29
Media Library /wp-admin/upload.php1.76 ▼1.254.91 ▼42.32
Ultimate Back To Top /wp-admin/options-general.php?page=nyams_ultimate_button1.769.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
nyams_ultimate_button

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Back To Top Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,855 ▲20816.78 ▲0.8516.12 ▲2.3160.66 ▲8.07
Dashboard /wp-admin2,999 ▲626.05 ▲0.07153.27 ▼12.55129.09 ▼4.52
Posts /wp-admin/edit.php2,771 ▲352.88 ▲0.1675.37 ▲1.78109.09 ▲4.01
Add New Post /wp-admin/post-new.php1,603 ▼8020.86 ▲2.54398.46 ▼28.13124.20 ▲2.51
Media Library /wp-admin/upload.php1,839 ▲325.09 ▲0.05159.94 ▼10.74126.25 ▼14.76
Ultimate Back To Top /wp-admin/options-general.php?page=nyams_ultimate_button1,2802.4860.57101.36

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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • nyams_ultimate_button

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=nyams_ultimate_button
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=nyams_ultimate_button
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=nyams_ultimate_button
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ultimate-back-to-top/nyams-ultimate-button.php:375

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: links, plugin, posts

ultimate-back-to-top/nyams-ultimate-button.php 92% from 13 tests

The main PHP file in "Ultimate Back To Top Button" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ultimate-back-to-top.php" instead of "nyams-ultimate-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected541 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP14121326
JavaScript23381
CSS25070
PO File1252764

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2392.00%
▷ Protected methods00.00%
▷ Private methods28.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin