74% floating-button

Code Review | Floating Button

WordPress plugin Floating Button scored74%from 54 tests.

About plugin

  • Plugin page: floating-button
  • Plugin version: 6.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Sep 8, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 51
  • Update frequency: every 36.8 days
  • Top authors: Wpcalc (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

4,000+ active /66,376 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Floating Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4038.85 ▼13.34
Dashboard /wp-admin3.65 ▲0.3047.02 ▼19.38
Posts /wp-admin/edit.php3.70 ▲0.3453.42 ▲7.01
Add New Post /wp-admin/post-new.php6.17 ▲0.2783.04 ▼1.93
Media Library /wp-admin/upload.php3.51 ▲0.2738.69 ▲4.36
Welcome /wp-admin/admin.php?page=wow-company3.4732.44
Floating Button Lite /wp-admin/admin.php?page=floating-button3.7041.28

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 134 new files
Database: 1 new table, 7 new options
New tables
wp_wow_fbtnp
New WordPress options
wow_fbtnp_db_version
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Floating Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10514.33 ▼0.041.58 ▼0.2141.89 ▼2.49
Dashboard /wp-admin2,264 ▲905.65 ▼0.0391.33 ▼6.6937.45 ▼5.96
Posts /wp-admin/edit.php2,166 ▲662.04 ▲0.0641.78 ▲7.7438.05 ▲2.85
Add New Post /wp-admin/post-new.php1,550 ▲2223.23 ▼0.03681.30 ▼16.6649.59 ▼8.38
Media Library /wp-admin/upload.php1,463 ▲634.38 ▲0.1799.64 ▼6.2041.16 ▼5.04
Welcome /wp-admin/admin.php?page=wow-company9312.1529.3955.03
Floating Button Lite /wp-admin/admin.php?page=floating-button1,3035.31102.2854.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wow_fbtnp
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wow_fbtnp_db_version
    • db_upgraded
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not 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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/floating-button/includes/pages/changelog.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FloatingButton\\Dashboard\\Field' not found in wp-content/plugins/floating-button/includes/settings/2.vertical.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FloatingButton\\Dashboard\\Field' not found in wp-content/plugins/floating-button/includes/settings/3.horizontal.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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:
  • Screenshots: These screenshots do not have images: #1 (Contact), #2 (Example), #3 (Player), #4 (Profile), #5 (Social), #6 (Skype)
The official readme.txt might help

floating-button/floating-button.php Passed 13 tests

The main PHP script in "Floating Button" version 6.0.2 is automatically included on every request by WordPress
51 characters long description:
Easily Generate and manage sticky Floating Buttons.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin20,048 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
CSS102,956658,513
PHP491,5655087,902
JavaScript65245202,018
Sass28243121,596
SVG10019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity25.40
▷ Minimum class complexity2.00
▷ Maximum class complexity93.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes26.67%
Methods255
▷ Static methods13954.51%
▷ Public methods19676.86%
▷ Protected methods10.39%
▷ Private methods5822.75%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/wow-icon.png121.88KB28.08KB▼ 76.96%
assets/img/plugin-logo.png15.67KB6.25KB▼ 60.12%