83% userswp-social-login

Code Review | UsersWP - Social Login

WordPress plugin UsersWP - Social Login scored83%from 54 tests.

About plugin

  • Plugin page: userswp-social-login
  • Plugin version: 1.3.25
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2020
  • Latest release: Apr 20, 2023
  • Number of updates: 26
  • Update frequency: every 45.2 days
  • Top authors: stiofansisland (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /84,191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.03ms] Passed 4 tests

An overview of server-side resources used by UsersWP - Social Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.59 ▼2.58
Dashboard /wp-admin3.31 ▼0.0443.66 ▼18.37
Posts /wp-admin/edit.php3.36 ▲0.0044.56 ▼1.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.47 ▼9.63
Media Library /wp-admin/upload.php3.23 ▲0.0034.13 ▲1.18

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 124 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for UsersWP - Social Login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.271.78 ▲0.1640.23 ▲1.90
Dashboard /wp-admin2,195 ▲145.63 ▼0.0988.87 ▼8.6641.10 ▼2.83
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0839.85 ▲4.4636.11 ▼1.43
Add New Post /wp-admin/post-new.php1,535 ▼418.10 ▼4.77589.44 ▼69.3965.48 ▲9.01
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.2094.86 ▼5.5643.20 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 87× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OpenID' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/AOLOpenID.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Exception\\RuntimeException' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Exception/BadMethodCallException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/Slack.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/Dropbox.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Exception\\InvalidArgumentException' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Exception/InvalidOauthTokenException.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OpenID' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/PaypalOpenID.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth1' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/Tumblr.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function uwp_social_get_provider_name_by_id() in wp-content/plugins/userswp-social-login/templates/linking.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/Paypal.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/userswp-social-login/vendor/hybridauth/Provider/Pinterest.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

userswp-social-login/uwp-social.php 85% from 13 tests

The main PHP script in "UsersWP - Social Login" version 1.3.25 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("userswp-social-login.php" instead of "uwp-social.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected8,916 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP1122,4445,0738,529
PO File1143178376
Markdown14010
HTML1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.71
▷ Minimum class complexity1.00
▷ Maximum class complexity189.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces11
Interfaces5
Traits1
Classes94
▷ Abstract classes55.32%
▷ Concrete classes8994.68%
▷ Final classes55.62%
Methods398
▷ Static methods174.27%
▷ Public methods27368.59%
▷ Protected methods11629.15%
▷ Private methods92.26%
Functions41
▷ Named functions3892.68%
▷ Anonymous functions37.32%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/btn_google_signin_dark_normal_web.png3.89KB2.09KB▼ 46.20%
assets/images/alert.png0.64KB0.72KB0.00%