89% floating-social-bar

Code Review | Floating Social Bar

WordPress plugin Floating Social Bar scored 89% from 54 tests.

About plugin

  • Plugin page: floating-social-bar
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2013
  • Latest release: Apr 7, 2015
  • Number of updates: 38
  • Update frequency: every 16.6 days
  • Top authors: griffinjt (100%)

Code review

54 tests

User reviews

76 reviews

Install metrics

3,000+ active / 236,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.77ms] Passed 4 tests

Server-side resources used by Floating Social Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.85 ▲0.23
Dashboard /wp-admin3.48 ▲0.1848.46 ▲0.09
Posts /wp-admin/edit.php3.60 ▲0.2450.69 ▼1.26
Add New Post /wp-admin/post-new.php6.06 ▲0.1897.05 ▼14.14
Media Library /wp-admin/upload.php3.41 ▲0.1838.74 ▲4.23
Floating Social Bar /wp-admin/options-general.php?page=floating-social-bar3.3833.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
fsb_global_option
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Floating Social Bar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.73 ▼0.661.63 ▼0.3143.56 ▼7.54
Dashboard /wp-admin2,210 ▲195.88 ▲1.0097.70 ▼5.3539.46 ▲0.22
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0040.90 ▲0.9233.39 ▼2.87
Add New Post /wp-admin/post-new.php6,483 ▲4,94920.23 ▼2.92839.19 ▲197.1358.89 ▼5.83
Media Library /wp-admin/upload.php1,392 ▲74.23 ▼0.0194.63 ▼4.8041.71 ▼2.74
Floating Social Bar /wp-admin/options-general.php?page=floating-social-bar1,3604.70143.76128.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 32 tag instead of maximum 10
You can take inspiration from this readme.txt

floating-social-bar/floating-social-bar.php 85% from 13 tests

"Floating Social Bar" version 1.1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 157 characters long)

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
No dangerous file extensions were detected6,752 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS3879394,694
JavaScript44863821,249
PHP2193416634
SVG100175

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity125.00
▷ Minimum class complexity125.00
▷ Maximum class complexity125.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods517.86%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fsb-sprite.png4.06KB3.17KB▼ 22.01%
images/soliloquy.png10.51KB9.79KB▼ 6.91%
css/images/sprite.png1.83KB1.33KB▼ 27.16%