78% social-media-buttons-toolbar

Code Review | Social Media Follow Buttons Bar

WordPress plugin Social Media Follow Buttons Bar scored 78% from 54 tests.

About plugin

  • Plugin page: social-media-butt...
  • Plugin version: 4.73
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 5.9.2
  • First release: Dec 19, 2015
  • Latest release: Jan 24, 2022
  • Number of updates: 187
  • Update frequency: every 11.9 days
  • Top authors: Arthur Gareginyan (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

20,000+ active / 701,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼303.35ms] Passed 4 tests

An overview of server-side resources used by Social Media Follow Buttons Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0445.65 ▼3.64
Dashboard /wp-admin3.43 ▲0.0335.12 ▲1.75
Posts /wp-admin/edit.php3.66 ▲0.0238.93 ▲2.87
Add New Post /wp-admin/post-new.php5.63 ▼1.3455.43 ▼1,210.83
Media Library /wp-admin/upload.php3.31 ▲0.0226.57 ▼0.69
Follow Buttons /wp-admin/options-general.php?page=social-media-buttons-toolbar3.2020.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 179 new files
Database: no new tables, 1 new option
New WordPress options
spacexchimp_p005_service_info

Browser metrics Passed 4 tests

Social Media Follow Buttons Bar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,914 ▲17016.58 ▲0.879.50 ▲3.152.02 ▼0.02
Dashboard /wp-admin2,897 ▲436.12 ▼0.04118.27 ▼16.93155.26 ▼0.55
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0062.46 ▼3.83137.11 ▼5.28
Add New Post /wp-admin/post-new.php1,755 ▲9421.20 ▲4.78415.48 ▼8.35156.11 ▲3.91
Media Library /wp-admin/upload.php1,700 ▲55.44 ▼0.08137.30 ▼10.62181.95 ▼5.14
Follow Buttons /wp-admin/options-general.php?page=social-media-buttons-toolbar11,3373.3682.39138.98

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • spacexchimp_p005_service_info

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=social-media-buttons-toolbar
    • > Notice in wp-content/plugins/social-media-buttons-toolbar/inc/php/options.php+42
    Undefined index: caption
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=social-media-buttons-toolbar
    • > Notice in wp-content/plugins/social-media-buttons-toolbar/inc/php/options.php+43
    Undefined index: icon-size
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=social-media-buttons-toolbar
    • > Notice in wp-content/plugins/social-media-buttons-toolbar/inc/php/options.php+44
    Undefined index: margin-right
    • > GET request to /wp-admin/options-general.php?page=social-media-buttons-toolbar
    • > Warning in wp-content/plugins/social-media-buttons-toolbar/inc/php/enqueue.php+31
    A non-numeric value encountered

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 16× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/inline-js.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/items.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/sidebar.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/page.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/tabs/usage.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/upgrade.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/versioning.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/enqueue.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/messages.php
    • > /wp-content/plugins/social-media-buttons-toolbar/inc/php/tabs/faq.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (35 tag instead of maximum 10)
You can look at the official readme.txt

social-media-buttons-toolbar/social-media-buttons-toolbar.php 92% from 13 tests

The main file in "Social Media Follow Buttons Bar" v. 4.73 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,373 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
SVG2102,677
PO File59209352,014
PHP173154111,441
CSS63689775
JavaScript413047466

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
130 compressed PNG files occupy 0.26MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/social-media-icons/bandcamp.png2.51KB2.63KB0.00%
inc/img/social-media-icons/ebay.png1.57KB1.63KB0.00%
inc/img/social-media-icons/tiktok.png1.36KB1.42KB0.00%
inc/img/social-media-icons/soundcloud.png1.52KB1.52KB0.00%
inc/img/social-media-icons/periscope.png2.46KB2.57KB0.00%