73% floating-social-buttons

Code Review | Floating Social Buttons

WordPress plugin Floating Social Buttons scored 73% from 53 tests.

About plugin

  • Plugin page: floating-social-b...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Feb 16, 2014
  • Latest release: Mar 4, 2014
  • Number of updates: 20
  • Update frequency: every 0.8 days
  • Top authors: bhagirath25 (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

100+ active / 10,806 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼268.28ms] Passed 4 tests

An overview of server-side resources used by Floating Social Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1737.11 ▲16.68
Dashboard /wp-admin3.11 ▲0.0644.72 ▲2.68
Posts /wp-admin/edit.php3.16 ▲0.0640.55 ▼1.87
Add New Post /wp-admin/post-new.php5.48 ▲0.0586.72 ▼1,059.02
Media Library /wp-admin/upload.php3.06 ▲0.0524.47 ▼14.89
Floating Social Buttons /wp-admin/options-general.php?page=floating-social-buttons3.0333.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 5 new options
New WordPress options

Browser metrics Passed 4 tests

Floating Social Buttons: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,967 ▲36121.73 ▲5.84119.55 ▲109.4378.46 ▲30.19
Dashboard /wp-admin2,964 ▲1175.91 ▲0.07134.38 ▼7.3698.67 ▼8.80
Posts /wp-admin/edit.php2,711 ▲52.68 ▼0.0067.11 ▼0.7693.07 ▼11.25
Add New Post /wp-admin/post-new.php1,856 ▲20319.12 ▲0.32359.96 ▲16.68103.18 ▼5.39
Media Library /wp-admin/upload.php1,780 ▲55.00 ▼0.04149.76 ▼10.21113.70 ▼5.22
Floating Social Buttons /wp-admin/options-general.php?page=floating-social-buttons1,8776.34170.3187.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 5 options in the database
    • floating_social_button_disable_mobile
    • floating_social_button_float
    • floating_social_button_position_left
    • selected_button
    • floating_social_button_position_top

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/floating-social-buttons/class/our_plugins.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-social-buttons/floating-social-buttons.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=floating-social-buttons
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 400 (Bad Request)
    • > GET request to /wp-admin/options-general.php?page=floating-social-buttons
    • > Network (severe)
    https://apis.google.com/_/im/_/widget/render/plus/followers?usegapi=1&bsv=o&action=followers&height=250&source=blogger%3Ablog%3Afollowers&width=280&origin=http%3A%2F%2Fwww.click2check.net&url=https%3A%2F%2Fplus.google.com%2F115313279456959924671&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en_GB.wyNTvg-ZoSU.O%2Fm%3D__features__%2Fam%3DIQ%2Frt%3Dj%2Fd%3D1%2Ft%3Dzcms%2Frs%3DAItRSTP1urva78IJIHxeksZE6kSRRrxiwQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&id=I0_1393700337193&parent=http%3A%2F%2Fwww.click2check.net&pfname=&rpctoken=99993975 - Failed to load resource: the server responded with a status of 404 ()


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: buttons, social, facebook like, stumbleupon, tweet...

floating-social-buttons/floating-social-buttons.php Passed 13 tests

The primary PHP file in "Floating Social Buttons" version 1.5 is used by WordPress to initiate all plugin functionality
82 characters long description:
Floating Social Buttons Provide an easy way to add floating social sharing button.

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
Everything looks great! No dangerous files found in this plugin8,358 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected