83% css-only-back-to-top-button

Code Review | CSS Only Back to Top

WordPress plugin CSS Only Back to Top scored83%from 54 tests.

About plugin

  • Plugin page: css-only-back-to-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Apr 8, 2020
  • Latest release: Nov 22, 2020
  • Number of updates: 24
  • Update frequency: every 9.5 days
  • Top authors: jamesosborne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.80ms] Passed 4 tests

This is a short check of server-side resources used by CSS Only Back to Top
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.55 ▼2.90
Dashboard /wp-admin3.31 ▲0.0143.52 ▼2.98
Posts /wp-admin/edit.php3.36 ▲0.0145.86 ▼1.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.15 ▲0.52
Media Library /wp-admin/upload.php3.24 ▲0.0133.00 ▲2.21
CSS Back to Top /wp-admin/options-general.php?page=jozz-settings-cssbacktotop3.2130.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

CSS Only Back to Top: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.33 ▼1.051.68 ▼0.0541.24 ▼3.77
Dashboard /wp-admin2,227 ▲395.10 ▼0.76107.69 ▼3.4037.93 ▼4.01
Posts /wp-admin/edit.php2,115 ▲292.31 ▲0.3341.58 ▲5.8634.30 ▲3.56
Add New Post /wp-admin/post-new.php1,529 ▲1523.23 ▲5.59674.60 ▲15.7137.64 ▼12.96
Media Library /wp-admin/upload.php1,403 ▲154.39 ▲0.2195.86 ▼4.6441.03 ▼3.55
CSS Back to Top /wp-admin/options-general.php?page=jozz-settings-cssbacktotop9972.4042.8124.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/css-only-back-to-top-button/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 90% 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:
  • Screenshots: Please add an image for screenshot #1 (Settings Screen)
  • Screenshots: A description for screenshot #3 is required in css-only-back-to-top-button/assets to your readme.txt
The official readme.txt might help

css-only-back-to-top-button/index.php 92% from 13 tests

This is the main PHP file of "CSS Only Back to Top" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("css-only-back-to-top-button.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin243 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues 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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions872.73%
▷ Anonymous functions327.27%
▷ Global constants1100.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
There are no PNG files in this plugin