77% wp-social

Code Review | Wp Social Login and Register Social Counter

WordPress plugin Wp Social Login and Register Social Counter scored77%from 54 tests.

About plugin

  • Plugin page: wp-social
  • Plugin version: 2.2.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2010
  • Latest release: Nov 28, 2023
  • Number of updates: 147
  • Update frequency: every 33.0 days
  • Top authors: ataurr (63.27%)dynamic-designs (31.29%)xpeedstudio (5.44%)wpmet (2.04%)

Code review

54 tests

User reviews

51 reviews

Install metrics

20,000+ active /371,950 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.51MB] [CPU: ▲156.35ms] 75% from 4 tests

An overview of server-side resources used by Wp Social Login and Register Social Counter
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 508.82ms on /wp-admin/admin.php?page=wp-social_get_help)
PageMemory (MB)CPU Time (ms)
Home /5.05 ▲1.5953.52 ▲12.08
Dashboard /wp-admin4.85 ▲1.50238.15 ▲175.87
Posts /wp-admin/edit.php4.85 ▲1.50297.36 ▲251.17
Add New Post /wp-admin/post-new.php7.48 ▲1.59542.33 ▲441.45
Media Library /wp-admin/upload.php4.66 ▲1.43221.82 ▲186.29
Social Login /wp-admin/admin.php?page=wslu_global_setting4.2130.00
Get Help /wp-admin/admin.php?page=wp-social_get_help4.63508.82
Social Share /wp-admin/admin.php?page=wslu_share_setting4.2129.95
Social Counter /wp-admin/admin.php?page=wslu_counter_setting4.2132.34
Settings /wp-admin/admin.php?page=wslu_settings4.2129.94

Server storage [IO: ▲9.59MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 490 new files
Database: no new tables, 17 new options
New WordPress options
theysaidso_admin_options
widget_login_widget
xs_share_providers_data
xs_counter_active
wp-social__stories_data
widget_recent-posts
widget_theysaidso_widget
xs_counter_options
widget_recent-comments
xs_counter_providers_data
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp Social Login and Register Social Counter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,054 ▲29213.79 ▼0.566.80 ▲5.0929.25 ▼16.16
Dashboard /wp-admin2,351 ▲1765.07 ▼0.66105.59 ▲7.0690.51 ▲44.86
Posts /wp-admin/edit.php2,181 ▲812.45 ▲0.4433.58 ▼6.3829.64 ▼6.09
Add New Post /wp-admin/post-new.php6,328 ▲4,80220.21 ▼2.94930.65 ▲272.1880.17 ▲24.01
Media Library /wp-admin/upload.php1,474 ▲774.59 ▲0.40105.53 ▲6.7068.34 ▲26.43
Social Login /wp-admin/admin.php?page=wslu_global_setting2,0242.4132.13113.54
Get Help /wp-admin/admin.php?page=wp-social_get_help1,8742.1528.0638.01
Social Share /wp-admin/admin.php?page=wslu_share_setting2,0212.3831.6583.94
Social Counter /wp-admin/admin.php?page=wslu_counter_setting2,0392.3928.1590.44
Settings /wp-admin/admin.php?page=wslu_settings2,0212.4034.1077.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • wp-social__stories_data
    • xs_counter_options
    • widget_share_widget
    • xs_share_providers_data
    • widget_login_widget
    • theysaidso_admin_options
    • db_upgraded
    • xs_counter_active
    • widget_recent-posts
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-social/inc/custom-function.php
  • 120× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/wp-social/lib/composer/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php:54
    • > PHP Fatal error
      Uncaught Error: Interface 'Hybridauth\\Logger\\LoggerInterface' not found in wp-content/plugins/wp-social/lib/composer/vendor/hybridauth/hybridauth/src/Logger/Logger.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Exception\\Exception' not found in wp-content/plugins/wp-social/lib/composer/vendor/hybridauth/hybridauth/src/Thirdparty/OpenID/LightOpenID.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OpenID' not found in wp-content/plugins/wp-social/lib/composer/vendor/hybridauth/hybridauth/src/Provider/OpenID.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Social\\Lib\\Provider\\Counter\\Counter' not found in wp-content/plugins/wp-social/lib/provider/counter/twitter-counter.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/wp-social/lib/composer/vendor/hybridauth/hybridauth/src/Provider/Discord.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/wp-social/lib/composer/vendor/hybridauth/hybridauth/src/Provider/GitHub.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Social\\Lib\\Provider\\Counter\\Counter' not found in wp-content/plugins/wp-social/lib/provider/counter/youtube-counter.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Social\\Base\\Api' not found in wp-content/plugins/wp-social/app/route.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-social/lib/onboard/views/onboard-steps/step-02.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: social counter, wordpress social login and register, woocommerce social login and register, social, social login...

wp-social/wp-social.php 92% from 13 tests

The main PHP script in "Wp Social Login and Register Social Counter" version 2.2.9 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin41,781 lines of code in 336 files:
LanguageFilesBlank linesComment linesLines of code
PHP26010,21819,09139,372
SVG35101,550
Markdown131670436
JSON600353
XML1144125
YAML12025
CSS100010
JavaScript9019
HTML1001

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.55
▷ Minimum class complexity1.00
▷ Maximum class complexity633.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces41
Interfaces8
Traits2
Classes197
▷ Abstract classes105.08%
▷ Concrete classes18794.92%
▷ Final classes52.67%
Methods1,557
▷ Static methods17911.50%
▷ Public methods1,38388.82%
▷ Protected methods1278.16%
▷ Private methods473.02%
Functions84
▷ Named functions6779.76%
▷ Anonymous functions1720.24%
Constants224
▷ Global constants2410.71%
▷ Class constants20089.29%
▷ Public constants200100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
132 PNG files occupy 1.34MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshort/counter/img-1.png12.91KB4.84KB▼ 62.48%
lib/onboard/assets/images/onboard/shape-10.png0.39KB0.25KB▼ 36.46%
assets/images/social-logo/posts-logo.png19.55KB14.85KB▼ 24.02%
assets/images/screenshort/share/img-17-v.png11.00KB4.55KB▼ 58.65%
assets/images/screenshort/login/style-2.png15.20KB6.99KB▼ 54.01%