72% sassy-social-share

Code Review | Social Sharing Plugin - Sassy Social Share

WordPress plugin Social Sharing Plugin - Sassy Social Share scored72%from 54 tests.

About plugin

  • Plugin page: sassy-social-share
  • Plugin version: 3.3.56
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Nov 15, 2023
  • Number of updates: 314
  • Update frequency: every 9.3 days
  • Top authors: Heateor (100%)

Code review

54 tests

User reviews

486 reviews

Install metrics

100,000+ active /4,836,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.32MB] [CPU: ▼1.61ms] Passed 4 tests

A check of server-side resources used by Social Sharing Plugin - Sassy Social Share
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.3750.78 ▲10.73
Dashboard /wp-admin4.66 ▲1.3252.39 ▼7.34
Posts /wp-admin/edit.php4.71 ▲1.3648.31 ▲3.07
Add New Post /wp-admin/post-new.php7.20 ▲1.3297.07 ▼6.06
Media Library /wp-admin/upload.php4.52 ▲1.2940.65 ▲3.88
Sassy Social Share /wp-admin/admin.php?page=heateor-sss-options5.7651.73
Social Share myCRED Integration /wp-admin/admin.php?page=heateor-sss-mycred-options4.5139.81
Social Analytics /wp-admin/admin.php?page=heateor-sss-ssga-options4.5236.57
Social Share Buttons /wp-admin/admin.php?page=heateor-sss-ssb-options4.5638.54
Recover Social Share Counts /wp-admin/admin.php?page=heateor-sss-rssc-options4.5141.42

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 189 new files
Database: no new tables, 11 new options
New WordPress options
widget_heateor_sss_floating_sharing
theysaidso_admin_options
widget_heateor_sss_sharing
heateor_sss
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
widget_heateor_sss_follow
heateor_sss_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for Social Sharing Plugin - Sassy Social Share
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,106 ▲35913.47 ▼0.8511.42 ▲9.7140.06 ▼3.67
Dashboard /wp-admin2,250 ▲695.57 ▼0.1091.36 ▼20.5186.44 ▲42.68
Posts /wp-admin/edit.php2,156 ▲562.11 ▲0.0934.36 ▼1.1029.66 ▼5.52
Add New Post /wp-admin/post-new.php1,764 ▲23823.24 ▼0.35750.79 ▲55.9964.40 ▲13.23
Media Library /wp-admin/upload.php1,452 ▲554.24 ▲0.0297.23 ▼7.3678.58 ▲30.39
Sassy Social Share /wp-admin/admin.php?page=heateor-sss-options10,5368.56196.03142.02
Social Share myCRED Integration /wp-admin/admin.php?page=heateor-sss-mycred-options1,2143.3985.2132.55
Social Analytics /wp-admin/admin.php?page=heateor-sss-ssga-options1,3313.3968.7035.62
Social Share Buttons /wp-admin/admin.php?page=heateor-sss-ssb-options1,8163.4256.2137.94
Recover Social Share Counts /wp-admin/admin.php?page=heateor-sss-rssc-options1,2623.4154.0930.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_heateor_sss_follow
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sassy-social-share/admin/partials/sassy-social-share-ssb-options.php
    • > /wp-content/plugins/sassy-social-share/admin/partials/sassy-social-share-my-cred-plugin-options.php
    • > /wp-content/plugins/sassy-social-share/admin/partials/sassy-social-share-rssc-plugin-options.php
    • > /wp-content/plugins/sassy-social-share/admin/partials/sassy-social-share-options-page.php
    • > /wp-content/plugins/sassy-social-share/images/themes/index.php
    • > /wp-content/plugins/sassy-social-share/admin/partials/sassy-social-share-about.php
    • > /wp-content/plugins/sassy-social-share/uninstall.php
    • > /wp-content/plugins/sassy-social-share/sassy-social-share.php
    • > /wp-content/plugins/sassy-social-share/admin/partials/sassy-social-share-ssga-plugin-options.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sassy-social-share/includes/class-sassy-social-share-widgets.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=heateor-sss-rssc-options
    • > Security (severe) in unknown
    http://platform.twitter.com/widgets/follow_button.html?screen_name=heateor - Refused to execute script from 'https://cdn.syndication.twimg.com/widgets/followbutton/info.json?callback=__twttr.setFollowersCountAndFollowing&lang=en&screen_names=heateor' because its MIME type ('') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (43 tag instead of maximum 10)
You can look at the official readme.txt

sassy-social-share/sassy-social-share.php Passed 13 tests

The primary PHP file in "Social Sharing Plugin - Sassy Social Share" version 3.3.56 is used by WordPress to initiate all plugin functionality
112 characters long description:
Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Reddit, Pinterest, WhatsApp and over 100 more

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin8,231 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
PHP167848596,724
JavaScript452311,374
SVG11400123
XML1007
CSS3003

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 164)
Cyclomatic complexity
Average complexity per logical line of code0.74
Average class complexity147.75
▷ Minimum class complexity10.00
▷ Maximum class complexity525.00
Average method complexity13.49
▷ Minimum method complexity1.00
▷ Maximum method complexity164.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods95
▷ Static methods00.00%
▷ Public methods7882.11%
▷ Protected methods00.00%
▷ Private methods1717.89%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants2
▷ Global constants2100.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
35 PNG files occupy 0.34MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/snaps/sss_twitter_username.png16.37KB7.17KB▼ 56.19%
images/sharing/twitter_tweet.png2.47KB1.39KB▼ 43.62%
images/sharing/stumbleupon_badge.png1.58KB1.35KB▼ 14.37%
images/sharing/google_plusone.png0.53KB0.29KB▼ 46.22%
images/social_icons.png5.91KB2.95KB▼ 50.04%