84% floating-action-buttons

Code Review | Floating Action Buttons

WordPress plugin Floating Action Buttons scored 84% from 54 tests.

About plugin

  • Plugin page: floating-action-b...
  • Plugin version: 0.9.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 5.8.1
  • First release: Jan 6, 2019
  • Latest release: Jul 28, 2021
  • Number of updates: 6
  • Update frequency: every 156.0 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 590 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.40MB] [CPU: ▼167.14ms] Passed 4 tests

This is a short check of server-side resources used by Floating Action Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.25 ▲0.4148.00 ▲9.64
Dashboard /wp-admin3.45 ▲0.4056.27 ▲3.93
Posts /wp-admin/edit.php3.54 ▲0.4356.02 ▲3.84
Add New Post /wp-admin/post-new.php5.81 ▲0.38103.92 ▼676.18
Media Library /wp-admin/upload.php3.40 ▲0.4036.18 ▼0.14

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 148 new files
Database: no new tables, 19 new options
New WordPress options
global_fake_sale_delay_time
qc_floating_action_button_disable
qc_floating_action_button_mode
position_y
recommended_products
qc_fab_global_widget_font_size
fake_sale_notification_sound
qc_fab_message_one
qc_fab_global_notification_delay_time
position_y_unit
...

Browser metrics Passed 4 tests

Checking browser requirements for Floating Action Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,992 ▲42016.61 ▲1.0719.04 ▲7.4853.14 ▼1.94
Dashboard /wp-admin2,985 ▲515.89 ▼0.11166.81 ▼64.71119.49 ▲1.62
Posts /wp-admin/edit.php2,754 ▲152.72 ▲0.0179.36 ▼2.3797.26 ▲0.63
Add New Post /wp-admin/post-new.php1,693 ▲11218.33 ▲0.04429.59 ▼7.09125.69 ▲0.08
Media Library /wp-admin/upload.php1,822 ▲125.02 ▼0.00182.07 ▲16.94118.96 ▼7.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • sell_notification_off_mobile
    • qc_fab_keyword_lang_change
    • global_fake_sale_delay_time
    • qc_fab_global_notification_delay_time
    • qc_floating_action_button_disable
    • qc_floating_action_button_loop_notification
    • position_y_unit
    • position_x
    • qc_fab_global_widget_font_size
    • qc_fab_floating_action_button_disable_notification_mobile
    • ...

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 no errors were found, 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-action-buttons/qc-fab-functions.php:2

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 Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: action buttons, conversion buttons, floating buttons

floating-action-buttons/floating-action-button-main.php 85% from 13 tests

The principal PHP file in "Floating Action Buttons" v. 0.9.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("floating-action-buttons.php" instead of "floating-action-button-main.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin27,197 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
CSS201,37319615,990
JavaScript641,1098456,354
SVG2002,959
PHP32941101,894

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity169.00
▷ Minimum class complexity169.00
▷ Maximum class complexity169.00
Average method complexity15.00
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
39 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom.png9.01KB4.90KB▼ 45.57%
images/icon-img.png3.75KB2.30KB▼ 38.61%
images/ball-item-icon.png3.24KB1.96KB▼ 39.48%
images/icon-12.png5.91KB3.10KB▼ 47.55%
images/light-arrow.png1.00KB0.11KB▼ 88.86%