84% fixed-html-toolbar

Code Review | Fixed HTML Toolbar

WordPress plugin Fixed HTML Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: fixed-html-toolbar
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Oct 23, 2023
  • Number of updates: 18
  • Update frequency: every 91.4 days
  • Top authors: Yiannistaos (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,799 total downloads

Benchmarks

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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▲4.86ms] Passed 4 tests

This is a short check of server-side resources used by Fixed HTML Toolbar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1941.93 ▲5.38
Dashboard /wp-admin3.70 ▲0.3954.98 ▲10.47
Posts /wp-admin/edit.php3.75 ▲0.3949.87 ▲5.22
Add New Post /wp-admin/post-new.php6.21 ▲0.3294.45 ▲14.58
Media Library /wp-admin/upload.php3.53 ▲0.3037.22 ▼1.63
Fixed HTML Toolbar /wp-admin/options-general.php?page=fixed-html-toolbar3.5738.61

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Fixed HTML Toolbar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21016.78 ▲2.581.65 ▲0.1545.18 ▼1.82
Dashboard /wp-admin2,377 ▲2107.71 ▲2.13132.52 ▲37.1837.88 ▼0.71
Posts /wp-admin/edit.php2,304 ▲2075.08 ▲3.1059.94 ▲24.1929.86 ▼6.72
Add New Post /wp-admin/post-new.php1,565 ▲3924.94 ▲1.24612.56 ▼123.7934.24 ▼28.94
Media Library /wp-admin/upload.php1,441 ▲415.43 ▲1.2392.45 ▼18.4140.47 ▼10.81
Fixed HTML Toolbar /wp-admin/options-general.php?page=fixed-html-toolbar3,1848.84179.2277.42

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/fixed-html-toolbar/uninstall.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/fixed-html-toolbar/admin/partials/about-plugin-view.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/fixed-html-toolbar/admin/partials/settings-view.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/fixed-html-toolbar/admin/partials/about-web357-view.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/fixed-html-toolbar/admin/partials/admin-view.php:18

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: web357, toolbar, fixed, sticky

fixed-html-toolbar/fixed-html-toolbar.php 92% from 13 tests

This is the main PHP file of "Fixed HTML Toolbar" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 245 characters long)

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
There were no executable files found in this plugin1,186 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP152075661,011
CSS42130123
JavaScript492951
HTML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.57
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3888.37%
▷ Protected methods00.00%
▷ Private methods511.63%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ 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
9 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/web357-logo.png18.33KB5.40KB▼ 70.53%
admin/img/social-icons/newsletter.png0.56KB0.67KB0.00%
admin/img/social-icons/rss.png1.20KB0.97KB▼ 19.00%
admin/img/social-icons/facebook.png0.66KB0.52KB▼ 20.91%
admin/img/social-icons/googleplus.png1.07KB0.82KB▼ 23.36%