77% ultimate-social-media-icons

Code Review | Social Media Share Buttons & Social Sharing Icons

WordPress plugin Social Media Share Buttons & Social Sharing Icons scored77%from 54 tests.

About plugin

  • Plugin page: ultimate-social-m...
  • Plugin version: 2.8.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Oct 6, 2023
  • Number of updates: 606
  • Update frequency: every 5.5 days
  • Top authors: socialdude (98.51%)iclyde (1.65%)

Code review

54 tests

User reviews

5268 reviews

Install metrics

100,000+ active /10,643,975 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.53MB] [CPU: ▲284.89ms] 75% from 4 tests

An overview of server-side resources used by Social Media Share Buttons & Social Sharing Icons
Please have a look at the following items
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 284.89ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /5.91 ▲2.4472.69 ▲33.91
Dashboard /wp-admin5.88 ▲2.58427.16 ▲374.03
Posts /wp-admin/edit.php5.97 ▲2.61426.59 ▲373.51
Add New Post /wp-admin/post-new.php8.37 ▲2.48466.13 ▲358.09
Media Library /wp-admin/upload.php5.89 ▲2.66424.28 ▲388.17

Server storage [IO: ▲22.74MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,528 new files
Database: no new tables, 62 new options
New WordPress options
sfsi_loyaltyDate
sfsi_footer_sec
sfsi_was_installed_before
sfsi_custom_icons
widget_recent-comments
sfsi_section2_options
sfsi_banner_global_shares
sfsi_feed_id
_tifm_feature_enabled
sfsi_addThis_icon_removal_notice_dismissed
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Share Buttons & Social Sharing Icons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,508 ▲74715.61 ▲1.3620.60 ▲18.5470.17 ▲20.78
Dashboard /wp-admin2,589 ▲4145.82 ▲0.05100.22 ▼8.8195.83 ▲49.65
Posts /wp-admin/edit.php2,510 ▲4102.87 ▲0.8348.56 ▲5.6260.70 ▲21.91
Add New Post /wp-admin/post-new.php6,918 ▲5,39222.23 ▲4.54922.77 ▲291.72188.47 ▲137.07
Media Library /wp-admin/upload.php1,782 ▲3825.17 ▲0.98114.04 ▲15.4387.94 ▲38.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 13 options in the database
    • _tifm_disable_feature_forever
    • widget_recent-posts
    • theysaidso_admin_options
    • _tifm_feature_enabled
    • widget_recent-comments
    • sfsi_was_installed_before
    • _tifm_force_disable_feature_fix
    • db_upgraded
    • analyst_cache
    • widget_sfsi-widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-social-media-icons/analyst/templates/forms/deactivate.php
    • > /wp-content/plugins/ultimate-social-media-icons/analyst/templates/optout.php
    • > /wp-content/plugins/ultimate-social-media-icons/analyst/templates/forms/install.php
    • > /wp-content/plugins/ultimate-social-media-icons/analyst/templates/optin.php
  • 109× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-social-media-icons/fonts/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-social-media-icons/libs/controllers/sfsi_forum_notification_popup.php:131
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-social-media-icons/images/icons_theme/thin/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-social-media-icons/views/deactivation/sfsi_deactivation_popup.php:11
    • > PHP Warning
      Use of undefined constant SFSI_PLUGURL - assumed 'SFSI_PLUGURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-social-media-icons/views/sfsi_section_for_premium.php on line 7
    • > PHP Warning
      Use of undefined constant SFSI_PLUGURL - assumed 'SFSI_PLUGURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-social-media-icons/views/sfsi_section_for_premium.php on line 5
    • > PHP Notice
      Undefined variable: option9 in wp-content/plugins/ultimate-social-media-icons/views/subviews/que3/sfsi_que3_place_via_sticky_bar.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-social-media-icons/images/icons_theme/orange/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ultimate-social-media-icons/libs/controllers/sfsiocns_OnPosts.php:539
    • > PHP Fatal error
      Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/ultimate-social-media-icons/views/sfsi_option_view3.php:5

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: social media, sharing icons, social share, widget, sharing...

ultimate-social-media-icons/ultimate_social_media_icons.php 85% from 13 tests

"Social Media Share Buttons & Social Sharing Icons" version 2.8.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultimate-social-media-icons.php" instead of "ultimate_social_media_icons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin63,696 lines of code in 447 files:
LanguageFilesBlank linesComment linesLines of code
PHP1234,8263,32023,322
SVG2974321,548
CSS101,20524512,474
JavaScript178848606,352

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity9.91
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces11
Interfaces6
Traits0
Classes51
▷ Abstract classes59.80%
▷ Concrete classes4690.20%
▷ Final classes00.00%
Methods394
▷ Static methods4010.15%
▷ Public methods34086.29%
▷ Protected methods123.05%
▷ Private methods4210.66%
Functions194
▷ Named functions16886.60%
▷ Anonymous functions2613.40%
Constants18
▷ Global constants1266.67%
▷ Class constants633.33%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
939 PNG files occupy 9.62MB with 2.87MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/visit_icons/Visit_us_twitter/icon_Visit_me_cs_CZ.png1.20KB0.75KB▼ 37.34%
banner/views/projects/usm/imgs/ribbon-icon.png1.27KB1.28KB0.00%
images/icons_theme/transparent/transparent_copylink.png3.63KB3.30KB▼ 9.19%
images/icons_theme/thin/thin_instagram.png7.12KB3.42KB▼ 51.91%
images/icons_theme/default/default_ok.png3.02KB1.49KB▼ 50.81%