62% floating-awesome-button

Code Review | Floating Awesome Button (Sticky Button & Popup) - CTA, Back to Top, Shortcodes, Widget, & More

WordPress plugin Floating Awesome Button (Sticky Button & Popup) - CTA, Back to Top, Shortcodes, Widget, & More scored62%from 54 tests.

About plugin

  • Plugin page: floating-awesome-...
  • Plugin version: 1.6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2021
  • Latest release: Nov 26, 2022
  • Number of updates: 47
  • Update frequency: every 8.2 days
  • Top authors: agung2001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /7,076 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▲1.17ms] 75% from 4 tests

This is a short check of server-side resources used by Floating Awesome Button (Sticky Button & Popup) - CTA, Back to Top, Shortcodes, Widget, & More
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,845.46ms on /wp-admin/options-general.php?page=floating-awesome-button-setting)
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8445.68 ▲4.24
Dashboard /wp-admin4.08 ▲0.7852.92 ▼5.09
Posts /wp-admin/edit.php4.12 ▲0.7753.06 ▲3.21
Add New Post /wp-admin/post-new.php6.69 ▲0.8098.43 ▲2.31
Media Library /wp-admin/upload.php4.01 ▲0.7849.48 ▲13.89
Add New /wp-admin/post-new.php?post_type=fab6.6995.79
Floating Awesome Button /wp-admin/options-general.php?page=floating-awesome-button-setting4.361,845.46
FAB /wp-admin/edit.php?post_type=fab4.0544.00
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius4.3444.08

Server storage [IO: ▲5.48MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 349 new files
Database: no new tables, 11 new options
New WordPress options
fab_config
widget_theysaidso_widget
fs_active_plugins
fs_debug_mode
fs_accounts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Floating Awesome Button (Sticky Button & Popup) - CTA, Back to Top, Shortcodes, Widget, & More
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲24813.87 ▼0.4814.65 ▲12.9027.67 ▼9.38
Dashboard /wp-admin2,255 ▲785.81 ▲0.2282.90 ▼11.15101.77 ▲63.23
Posts /wp-admin/edit.php2,183 ▲862.35 ▲0.3647.32 ▲7.9237.65 ▼0.49
Add New Post /wp-admin/post-new.php1,738 ▲21222.36 ▼0.71713.84 ▲95.4532.60 ▼44.77
Media Library /wp-admin/upload.php1,472 ▲694.45 ▲0.17100.99 ▲1.30119.77 ▲78.67
Add New /wp-admin/post-new.php?post_type=fab7,19019.83886.2657.01
Floating Awesome Button /wp-admin/options-general.php?page=floating-awesome-button-setting1,0552.2036.7467.05
FAB /wp-admin/edit.php?post_type=fab1,1512.4638.1535.62
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius1,1402.0630.7232.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/floating-awesome-button/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode
    • widget_recent-posts
    • fs_gdpr
    • fab_config
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/floating-awesome-button/src/View/Element/reload.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Frontend/button.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Backend/Metabox/setting.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Frontend/Module/search.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Backend/setting.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Frontend/modal.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Backend/Metabox/location.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Tailwind/element.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Backend/Metabox/trigger.php
    • > /wp-content/plugins/floating-awesome-button/src/View/Backend/Metabox/design.php
  • 74× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Controller\\Base' not found in wp-content/plugins/floating-awesome-button/src/Plugin/Customizer.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/floating-awesome-button/src/View/Template/backend/default.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Feature\\Feature' not found in wp-content/plugins/floating-awesome-button/src/Feature/Design.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Controller\\Base' not found in wp-content/plugins/floating-awesome-button/src/Controller/Backend/BackendPage.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Feature\\Feature' not found in wp-content/plugins/floating-awesome-button/src/Feature/Frontend.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Controller\\Base' not found in wp-content/plugins/floating-awesome-button/src/Controller/Metabox/MetaboxSetting.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Controller\\Base' not found in wp-content/plugins/floating-awesome-button/src/Controller/Metabox/MetaboxTrigger.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/floating-awesome-button/src/View/Element/loading-field.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/floating-awesome-button/src/View/Template/backend/box.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Fab\\Wordpress\\Model\\Model' not found in wp-content/plugins/floating-awesome-button/src/Wordpress/Model/Type.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=fab
    • > Javascript (severe) in unknown
    /wp-content/plugins/floating-awesome-button/assets/build/components/metabox-trigger/bundle.js?ver=1.0 0:2488 Uncaught TypeError: Cannot read properties of undefined (reading '$$')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: You can take inspiration from this readme.txt

floating-awesome-button/floating-awesome-button.php 92% from 13 tests

Analyzing the main PHP file in "Floating Awesome Button (Sticky Button & Popup) - CTA, Back to Top, Shortcodes, Widget, & More" version 1.6.1
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 142 characters long)

Code Analysis 97% from 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 plugin38,666 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
PHP2379,26820,26338,383
JavaScript203477211
JSON20049
CSS2301923

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity38.84
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces16
Interfaces0
Traits13
Classes115
▷ Abstract classes76.09%
▷ Concrete classes10893.91%
▷ Final classes00.00%
Methods1,725
▷ Static methods21112.23%
▷ Public methods1,33977.62%
▷ Protected methods170.99%
▷ Private methods36921.39%
Functions97
▷ Named functions9496.91%
▷ Anonymous functions33.09%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/logo.png3.93KB0.74KB▼ 81.21%
assets/img/icon.png2.84KB0.41KB▼ 85.64%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%