78% social-buttons-pack

Code Review | Social Buttons Pack by BestWebSoft

WordPress plugin Social Buttons Pack by BestWebSoft scored78%from 54 tests.

About plugin

  • Plugin page: social-buttons-pack
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2015
  • Latest release: May 22, 2023
  • Number of updates: 38
  • Update frequency: every 77.7 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /38,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.77MB] [CPU: ▼7.44ms] Passed 4 tests

An overview of server-side resources used by Social Buttons Pack by BestWebSoft
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0646.82 ▼1.95
Dashboard /wp-admin4.47 ▲1.1262.63 ▼1.10
Posts /wp-admin/edit.php4.50 ▲1.1465.94 ▲14.69
Add New Post /wp-admin/post-new.php5.68 ▼0.2156.36 ▼39.85
Media Library /wp-admin/upload.php4.32 ▲1.1050.96 ▲13.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 200 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
sclbttns_options
db_upgraded
bstwbsftwppdtplgns_options
lnkdn_options
widget_recent-comments
pntrst_options
can_compress_scripts
widget_pntrst-widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Social Buttons Pack by BestWebSoft: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,290 ▲54415.60 ▲1.2349.10 ▲47.0949.77 ▲5.48
Dashboard /wp-admin2,560 ▲3725.89 ▲1.05107.12 ▼13.4239.24 ▼2.63
Posts /wp-admin/edit.php2,453 ▲3612.24 ▲0.1938.63 ▼0.5633.51 ▼0.30
Add New Post /wp-admin/post-new.php1,870 ▲35121.16 ▼2.32689.31 ▼19.1356.85 ▼2.89
Media Library /wp-admin/upload.php1,742 ▲3604.35 ▲0.17106.88 ▲4.4844.54 ▲2.09
Settings /wp-admin/social-buttons.php260.440.0714.53
BWS Panel /wp-admin/social-buttons.php?page=sclbttns-bws-panel260.440.107.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_pntrst-widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-buttons-pack/twitter-plugin/twitter.php:338
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/social-buttons-pack/bws_menu/product_list.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/social-buttons-pack/includes/class-sclbttns-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/social-buttons-pack/includes/sclbttns-nstgrm-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-buttons-pack/bws-pinterest/bws-pinterest.php:329
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-buttons-pack/facebook-button-plugin/facebook-button-plugin.php:765
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-buttons-pack/social-buttons-pack.php:377
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-buttons-pack/bws-linkedin/bws-linkedin.php:305
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/social-buttons-pack/bws-linkedin/includes/class-lnkdn-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/social-buttons-pack/twitter-plugin/includes/class-twttr-settings.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/social-buttons.php
    • > Network (severe)
    wp-admin/social-buttons.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/social-buttons.php?page=sclbttns-bws-panel
    • > Network (severe)
    wp-admin/social-buttons.php?page=sclbttns-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (Displaying Social Buttons in your post.), #2 (Displaying Pinterest Pin widget.), #3 (Displaying Pinterest Board widget.), #4 (Displaying Pinterest Profile widget.), #5 (Plugin settings page: Facebook.), #6 (Plugin settings page: Twitter.), #7 (Plugin settings page: Pinterest.), #8 (Plugin settings page: LinkedIn.), #9 (Plugin settings page: Instagram.), #10 (Adding widgets to the sidebar.), #11 (Adding Social Buttons shortcode to your post or page.)
The official readme.txt is a good inspiration

social-buttons-pack/social-buttons-pack.php Passed 13 tests

The main file in "Social Buttons Pack by BestWebSoft" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
109 characters long description:
Add social media buttons and widgets to WordPress posts, pages and widgets. FB, Twitter, Pinterest, LinkedIn.

Code Analysis Passed 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 plugin27,603 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PO File307,09011,93013,044
PHP198098337,938
CSS182002905,791
JavaScript1352135759
SVG10071

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity58.00
▷ Minimum class complexity4.00
▷ Maximum class complexity224.00
Average method complexity8.66
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods67
▷ Static methods00.00%
▷ Public methods6089.55%
▷ Protected methods00.00%
▷ Private methods710.45%
Functions127
▷ Named functions127100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
79 PNG files occupy 5.44MB with 1.82MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/icons/plugins/bike-rental.png6.86KB2.68KB▼ 60.89%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
facebook-button-plugin/images/standard-facebook-ico.png1.66KB1.01KB▼ 39.17%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_75_dadada_1x400.png0.16KB0.16KB0.00%
bws_menu/icons/themes/realestate.png280.34KB108.34KB▼ 61.35%