68% simple-social-buttons

Code Review | Simple Social Media Share Buttons - Social Sharing for Everyone

WordPress plugin Simple Social Media Share Buttons - Social Sharing for Everyone scored68%from 54 tests.

About plugin

  • Plugin page: simple-social-but...
  • Plugin version: 5.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 22, 2011
  • Latest release: Nov 3, 2023
  • Number of updates: 163
  • Update frequency: every 27.2 days
  • Top authors: xradar (57.67%)hiddenpearls (42.94%)

Code review

54 tests

User reviews

174 reviews

Install metrics

30,000+ active /1,095,163 total downloads

Benchmarks

Plugin footprint 65% 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.78MB] [CPU: ▼3.60ms] Passed 4 tests

This is a short check of server-side resources used by Simple Social Media Share Buttons - Social Sharing for Everyone
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5037.32 ▼2.62
Dashboard /wp-admin4.22 ▲0.8854.28 ▼6.46
Posts /wp-admin/edit.php4.28 ▲0.9252.10 ▲6.20
Add New Post /wp-admin/post-new.php6.77 ▲0.8889.24 ▼11.52
Media Library /wp-admin/upload.php4.08 ▲0.8640.83 ▲8.17
Settings /wp-admin/admin.php?page=simple-social-buttons4.0635.81
Help /wp-admin/admin.php?page=ssb-help4.1038.07
Import / Export /wp-admin/admin.php?page=ssb-import-export4.0634.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 90 new files
Database: no new tables, 17 new options
New WordPress options
ssb_networks
ssb_pr_version
widget_recent-comments
widget_theysaidso_widget
ssb_positions
ssb_themes
widget_ssb_widget
ssb_media
widget_recent-posts
ssb_inline
...

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Social Media Share Buttons - Social Sharing for Everyone
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲20914.30 ▼0.1342.99 ▲41.3146.47 ▲1.02
Dashboard /wp-admin2,243 ▲635.95 ▲0.3288.77 ▼12.7041.05 ▼3.84
Posts /wp-admin/edit.php2,150 ▲472.26 ▲0.1840.00 ▲0.2836.33 ▼2.38
Add New Post /wp-admin/post-new.php6,275 ▲4,74426.16 ▲3.07935.54 ▲239.9638.30 ▼24.64
Media Library /wp-admin/upload.php1,448 ▲484.36 ▲0.1597.27 ▼9.3641.77 ▼6.57
Settings /wp-admin/admin.php?page=simple-social-buttons2,9632.8864.3680.46
Help /wp-admin/admin.php?page=ssb-help8592.1534.5528.35
Import / Export /wp-admin/admin.php?page=ssb-import-export9091.9227.2128.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Notice in wp-content/plugins/simple-social-buttons/uninstall.php+18
    Undefined index: ssb_uninstall_data
  • The uninstall procedure has failed, leaving 17 options in the database
    • ssb_positions
    • ssb_media
    • widget_theysaidso_widget
    • ssb_networks
    • ssb_inline
    • can_compress_scripts
    • widget_ssb_widget
    • ssb_themes
    • theysaidso_admin_options
    • widget_recent-posts
    • ...

Smoke tests 50% 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 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php
  • 61× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 10
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 26
    • > PHP Warning
      include_once(SSB_PLUGIN_DIR/classes/ssb-settings-structure.php): failed to open stream: No such file or directory in wp-content/plugins/simple-social-buttons/classes/ssb-settings.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-social-buttons/classes/ssb-widget.php:10
    • > PHP Notice
      Undefined variable: facebook_show_counter in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-social-buttons/inc/ssb-widget-fields.php:3
    • > PHP Notice
      Undefined variable: instagram_follower in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 33
    • > PHP Notice
      Undefined variable: google_id in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 21
    • > PHP Notice
      Undefined variable: whatsapp_text in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 36
    • > PHP Notice
      Undefined variable: youtube_text in wp-content/plugins/simple-social-buttons/inc/ssb-widget-front.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: twitter, social buttons, facebook, plus one, pinterest...

simple-social-buttons/simple-social-buttons.php 92% from 13 tests

The main PHP file in "Simple Social Media Share Buttons - Social Sharing for Everyone" ver. 5.1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 262 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin15,335 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP221,1961,7055,246
CSS44124234,554
JavaScript45433662,756
PO File121,2372,1532,147
SVG14012632

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity91.86
▷ Minimum class complexity15.00
▷ Maximum class complexity222.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods187
▷ Static methods10.53%
▷ Public methods18699.47%
▷ Protected methods00.00%
▷ Private methods10.53%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ssb_grey_logo.png9.53KB5.18KB▼ 45.60%
assets/images/viber.png0.94KB0.83KB▼ 11.05%
assets/images/fblike.png1.65KB0.48KB▼ 71.07%
assets/images/twitter.png0.81KB0.71KB▼ 13.07%
assets/images/googleplus.png0.89KB0.79KB▼ 11.91%