78% wp-share-buttons-analytics-by-getsocial

Code Review | Social Share Buttons & Analytics Plugin – GetSocial.io

WordPress plugin Social Share Buttons & Analytics Plugin – GetSocial.io scored78%from 54 tests.

About plugin

  • Plugin page: wp-share-buttons-...
  • Plugin version: 4.3.12
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2014
  • Latest release: Oct 4, 2023
  • Number of updates: 494
  • Update frequency: every 6.6 days
  • Top authors: joaoromao (100%)

Code review

54 tests

User reviews

154 reviews

Install metrics

5,000+ active /516,602 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.28MB] [CPU: ▼18.80ms] Passed 4 tests

Analyzing server-side resources used by Social Share Buttons & Analytics Plugin – GetSocial.io
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6018.84 ▼25.25
Dashboard /wp-admin3.16 ▼0.1432.42 ▼21.34
Posts /wp-admin/edit.php3.30 ▼0.0548.12 ▲1.55
Add New Post /wp-admin/post-new.php5.55 ▼0.3479.28 ▼21.43
Media Library /wp-admin/upload.php3.25 ▲0.0229.71 ▼7.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Share Buttons & Analytics Plugin – GetSocial.io
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲19013.18 ▼1.2111.15 ▲8.6157.83 ▲0.36
Dashboard /wp-admin2,374 ▲1975.94 ▲0.2799.35 ▼2.1672.34 ▲28.52
Posts /wp-admin/edit.php2,302 ▲2022.96 ▲0.9457.02 ▲14.3654.71 ▲19.75
Add New Post /wp-admin/post-new.php1,640 ▲11221.56 ▼1.49630.79 ▼15.8779.58 ▲23.65
Media Library /wp-admin/upload.php1,599 ▲2028.50 ▲4.27146.44 ▲40.2060.21 ▲14.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/apps_filters.php
    • > /wp-content/plugins/wp-share-buttons-analytics-by-getsocial/lib/onboarding_popup.php
    • > /wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/apps.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/wp-share-buttons-analytics-getsocial.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/header.php:2
    • > PHP Notice
      Undefined variable: plan_is_free in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/apps_filters.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/init.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/apps.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/footer.php:2
    • > PHP Notice
      Undefined variable: plan_categories in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/apps.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/apps_config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-share-buttons-analytics-by-getsocial/tmpl/alerts.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (GetSocial for Wordpress), #2 (Our Plugin's dashboard), #3 (Our available button designs), #4 (Horizontal and Floating Sharing Bar), #5 (Big Social Counter Bar), #6 (Mobile Sharing Bar), #7 (Welcome and Subscribe Bar), #8 (Native Social Sharing Bar), #9 (Analytics for your Social Bars)
The official readme.txt is a good inspiration

wp-share-buttons-analytics-by-getsocial/wp-share-buttons-analytics-getsocial.php 85% from 13 tests

The main PHP script in "Social Share Buttons & Analytics Plugin – GetSocial.io" version 4.3.12 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 284 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-share-buttons-analytics-by-getsocial.php" instead of "wp-share-buttons-analytics-getsocial.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin7,143 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS11,12505,421
PHP11187621,304
JavaScript210521418

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
29 compressed PNG files occupy 1.59MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png221.21KB110.33KB▼ 50.12%
img/apps/welcome-bar.png2.95KB2.85KB▼ 3.25%
img/getsocial-app-logo.png1.17KB1.24KB0.00%
img/modals/ga_integration.png16.51KB16.98KB0.00%
img/apps/reaction_buttons.png3.06KB3.06KB0.00%