84% simple-goto-top-button

Code Review | Simple Goto Top Button

WordPress plugin Simple Goto Top Button scored84%from 54 tests.

About plugin

  • Plugin page: simple-goto-top-b...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.3
  • WordPress version: 6.3.1
  • First release: Jul 17, 2021
  • Latest release: Oct 18, 2022
  • Number of updates: 5
  • Update frequency: every 91.8 days
  • Top authors: jitendra742744 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Simple Goto Top Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.05 ▼6.42
Dashboard /wp-admin3.35 ▲0.0546.42 ▼2.01
Posts /wp-admin/edit.php3.40 ▲0.0445.34 ▲0.07
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.97 ▼3.95
Media Library /wp-admin/upload.php3.27 ▲0.0437.00 ▲2.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Goto Top Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.60 ▼1.152.00 ▲0.0444.11 ▼3.95
Dashboard /wp-admin2,217 ▲295.04 ▲0.1697.90 ▼16.5374.35 ▲26.10
Posts /wp-admin/edit.php2,114 ▲252.29 ▲0.2648.80 ▲10.4136.39 ▲4.32
Add New Post /wp-admin/post-new.php1,522 ▼817.59 ▼0.63709.52 ▲67.3438.57 ▼10.89
Media Library /wp-admin/upload.php1,400 ▲124.36 ▲0.20102.69 ▼0.1276.71 ▲31.20

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-goto-top-button/simple-goto-top-button.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: page scroll to top, easy scroll to top button, goto top button, page top button, scroll to top button...

simple-goto-top-button/simple-goto-top-button.php 85% from 13 tests

The entry point to "Simple Goto Top Button" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 188 characters long)
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin302 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13413160
CSS2142105
JavaScript210037

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
9 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/arrow_style6.png1.54KB1.20KB▼ 22.11%
assets/img/arrow_style4.png0.52KB0.39KB▼ 24.15%
assets/img/arrow_style2.png4.83KB2.86KB▼ 40.81%
assets/img/arrow_style3.png6.05KB2.74KB▼ 54.68%
assets/img/sgtb.png0.39KB0.32KB▼ 17.25%