73% social-share-buttons-by-supsystic

Code Review | Social Share Buttons by Supsystic

WordPress plugin Social Share Buttons by Supsystic scored73%from 54 tests.

About plugin

  • Plugin page: social-share-butt...
  • Plugin version: 2.2.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 20, 2015
  • Latest release: Aug 30, 2022
  • Number of updates: 123
  • Update frequency: every 21.9 days
  • Top authors: supsystic.com (100%)

Code review

54 tests

User reviews

42 reviews

Install metrics

6,000+ active /572,080 total downloads

Benchmarks

Plugin footprint 65% 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.03MB] [CPU: ▲3.91ms] 75% from 4 tests

This is a short check of server-side resources used by Social Share Buttons by Supsystic
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,028.52ms on /wp-admin/admin.php?page=supsystic-social-sharing&module=overview)
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.1516.46 ▼21.92
Dashboard /wp-admin3.66 ▲0.3559.79 ▲15.29
Posts /wp-admin/edit.php3.71 ▲0.3558.52 ▲10.40
Add New Post /wp-admin/post-new.php6.20 ▲0.3199.35 ▲12.34
Media Library /wp-admin/upload.php3.58 ▲0.3551.85 ▲14.81
Projects /wp-admin/admin.php?page=supsystic-social-sharing&module=projects4.47463.48
Social Share by Supsystic /wp-admin/admin.php?page=supsystic-social-sharing4.4764.60
Overview /wp-admin/admin.php?page=supsystic-social-sharing&module=overview6.261,028.52
New Project /wp-admin/admin.php?page=supsystic-social-sharing&module=projects&action=add4.4968.47

Server storage [IO: ▲6.10MB] [DB: ▲0.08MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 555 new files
Database: 6 new tables, 11 new options
New tables
wp_supsystic_ss_shares
wp_supsystic_ss_shares_object
wp_supsystic_ss_views
wp_supsystic_ss_project_networks
wp_supsystic_ss_networks
wp_supsystic_ss_projects
New WordPress options
sss_promo_shown
can_compress_scripts
widget_supsystic_social_sharing
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
sss_welcome_page_was_showed
showSharingRevNotice
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Social Share Buttons by Supsystic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.35 ▲0.071.56 ▲0.1242.09 ▲2.76
Dashboard /wp-admin2,237 ▲635.63 ▼0.0292.60 ▲5.6341.30 ▲0.24
Posts /wp-admin/edit.php2,142 ▲422.01 ▼0.0239.94 ▲1.7034.02 ▼0.70
Add New Post /wp-admin/post-new.php1,559 ▲2123.26 ▼0.04680.44 ▼0.8465.40 ▲10.91
Media Library /wp-admin/upload.php1,439 ▲394.20 ▼0.0797.17 ▲3.6542.19 ▼0.16
Projects /wp-admin/admin.php?page=supsystic-social-sharing&module=projects1,3929.77312.9167.16
Social Share by Supsystic /wp-admin/admin.php?page=supsystic-social-sharing1,0723.3261.5545.95
Overview /wp-admin/admin.php?page=supsystic-social-sharing&module=overview2,34216.79445.9449.39
New Project /wp-admin/admin.php?page=supsystic-social-sharing&module=projects&action=add1,2083.6962.8842.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 6 tables in the database
    • wp_supsystic_ss_networks
    • wp_supsystic_ss_views
    • wp_supsystic_ss_projects
    • wp_supsystic_ss_project_networks
    • wp_supsystic_ss_shares_object
    • wp_supsystic_ss_shares
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_supsystic_social_sharing
    • db_upgraded
    • showSharingRevNotice
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • sss_welcome_page_was_showed
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 213× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_SupTwgSss_TestInterface' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/Test.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_SupTwgSss_TokenParserInterface' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/TokenParser.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_SupTwgSss_Node_Expression_Binary' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/Node/Expression/Binary/EndsWith.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_SupTwgSss_BaseNodeVisitor' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/NodeVisitor/Optimizer.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'RscSss_Mvc_Module' not found in wp-content/plugins/social-share-buttons-by-supsystic/src/SocialSharing/Overview/Module.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_SupTwgSss_TokenParser' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/TokenParser/Block.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_SupTwgSss_LoaderInterface' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/Loader/Array.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/Test/NodeTestCase.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_SupTwgSss_Node_Expression' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/Node/Expression/TempName.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_SupTwgSss_CacheInterface' not found in wp-content/plugins/social-share-buttons-by-supsystic/vendor/Twig/Cache/Null.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 ([Social Buttons Design](http://supsystic.com/plugins/social-share-plugin?utm_source=plugin&utm_medium=screenshotfirst&utm_campaign=socialbuttons "Social Buttons Design")), #2 (Social Share Buttons Admin Interface), #3 ([Social Share Buttons](http://supsystic.com/plugins/social-share-plugin?utm_source=plugin&utm_medium=screenshotsecond&utm_campaign=socialbuttons "Social Share Buttons") by Supsystic - admin interface. Where and when to show social buttons), #4 (Black and White Social Buttons)
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

social-share-buttons-by-supsystic/index.php 92% from 13 tests

The main PHP file in "Social Share Buttons by Supsystic" ver. 2.2.9 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-share-buttons-by-supsystic.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected44,794 lines of code in 456 files:
LanguageFilesBlank linesComment linesLines of code
PHP3074,3809,01019,118
JavaScript646561,4278,364
CSS414304886,042
PO File122,4221045,362
SVG2002,908
Twig20143882,168
LESS1010730832

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.55
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces34
Traits0
Classes270
▷ Abstract classes197.04%
▷ Concrete classes25192.96%
▷ Final classes10.40%
Methods1,769
▷ Static methods663.73%
▷ Public methods1,56488.41%
▷ Protected methods1679.44%
▷ Private methods382.15%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants64
▷ Global constants34.69%
▷ Class constants6195.31%
▷ Public constants61100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
57 PNG files occupy 0.63MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/assets/css/libraries/minimal/minimal.png2.23KB1.44KB▼ 35.45%
app/assets/css/libraries/minimal/yellow@2x.png1.37KB2.66KB0.00%
src/SocialSharing/Projects/assets/images/free_icons.png23.46KB10.08KB▼ 57.02%
app/assets/css/images/ui-bg_highlight-hard_15_888888_1x100.png0.25KB0.14KB▼ 43.82%
src/SocialSharing/Overview/assets/img/overview-02.png16.54KB5.61KB▼ 66.11%