10% brozzme-scroll-top

Code Review | Brozzme Scroll Top

WordPress plugin Brozzme Scroll Top scored10%from 54 tests.

About plugin

  • Plugin page: brozzme-scroll-top
  • Plugin version: 1.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 6.3.1
  • First release: Sep 1, 2016
  • Latest release: Oct 28, 2021
  • Number of updates: 126
  • Update frequency: every 14.9 days
  • Top authors: Benoti (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /9,074 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/brozzme-scroll-top/includes/brozzme_divi_override.php+19
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.17ms] Passed 4 tests

Server-side resources used by Brozzme Scroll Top
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.92 ▲3.40
Dashboard /wp-admin3.52 ▲0.1747.46 ▼9.97
Posts /wp-admin/edit.php3.63 ▲0.2751.26 ▲3.45
Add New Post /wp-admin/post-new.php6.12 ▲0.2388.58 ▼5.55
Media Library /wp-admin/upload.php3.44 ▲0.2137.06 ▲5.96
Brozzme /wp-admin/admin.php?page=brozzme-plugins3.55332.89
Scroll top /wp-admin/admin.php?page=brozzme-scroll-top3.4039.19

Server storage [IO: ▲0.25MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
bst_general_settings
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Brozzme Scroll Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.79 ▼0.797.00 ▲5.2644.80 ▲0.96
Dashboard /wp-admin2,258 ▲675.09 ▼0.8198.90 ▲0.1538.80 ▼1.06
Posts /wp-admin/edit.php2,140 ▲692.33 ▲0.3041.45 ▲5.4534.13 ▲0.65
Add New Post /wp-admin/post-new.php1,554 ▲1217.81 ▼0.39684.61 ▲84.2036.83 ▼21.55
Media Library /wp-admin/upload.php1,440 ▲554.39 ▲0.2597.37 ▼1.7942.53 ▼1.47
Brozzme /wp-admin/admin.php?page=brozzme-plugins1,1502.0325.5649.15
Scroll top /wp-admin/admin.php?page=brozzme-scroll-top1,3132.3447.2629.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method brozzme_scroll_top::uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brozzme-scroll-top/includes/brozzme_scrolltop_settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brozzme-scroll-top/includes/brozzme_divi_override.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brozzme-scroll-top/includes/brozzme_oceanwp_override.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/brozzme-scroll-top/brozzme_scroll_top.php:21

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

brozzme-scroll-top/brozzme_scroll_top.php 92% from 13 tests

The entry point to "Brozzme Scroll Top" version 1.8.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("brozzme-scroll-top.php" instead of "brozzme_scroll_top.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,300 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP5213228850
CSS32321245
PO File15670177
JavaScript310922
SVG1016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.60
▷ Minimum class complexity6.00
▷ Maximum class complexity51.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
3 PNG files occupy 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/wpserveur-logo-400x80.png25.78KB8.87KB▼ 65.60%
includes/img/logo-wps-200x200px.png30.17KB7.41KB▼ 75.43%
includes/img/300x300.png59.90KB11.67KB▼ 80.51%