68% xlogin

Code Review | XLogin

WordPress plugin XLogin scored68%from 54 tests.

About plugin

  • Plugin page: xlogin
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2020
  • Latest release: Jun 5, 2021
  • Number of updates: 18
  • Update frequency: every 24.6 days
  • Top authors: scoop082110 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.62ms] Passed 4 tests

Analyzing server-side resources used by XLogin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.22 ▼5.71
Dashboard /wp-admin3.34 ▲0.0447.05 ▼5.32
Posts /wp-admin/edit.php3.39 ▲0.0346.26 ▼3.58
Add New Post /wp-admin/post-new.php5.95 ▲0.07101.41 ▲4.15
Media Library /wp-admin/upload.php3.26 ▲0.0342.96 ▲4.23
XLogin /wp-admin/options-general.php?page=pl2010-xlogin3.2329.95

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 219 new files
Database: 1 new table, 7 new options
New tables
wp_xlogin_users
New WordPress options
widget_theysaidso_widget
widget_recent-posts
xlogin_options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

XLogin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.49 ▲0.111.67 ▼0.1540.37 ▼3.81
Dashboard /wp-admin2,211 ▲315.95 ▲0.35108.00 ▲15.3037.91 ▼6.59
Posts /wp-admin/edit.php2,123 ▲233.03 ▲0.9849.95 ▲12.0133.56 ▼5.43
Add New Post /wp-admin/post-new.php1,692 ▲16623.62 ▲6.11667.85 ▼30.5561.65 ▲5.34
Media Library /wp-admin/upload.php1,414 ▲205.39 ▲1.18122.46 ▲2.9341.70 ▼8.50
XLogin /wp-admin/options-general.php?page=pl2010-xlogin9213.1153.0534.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_xlogin_users
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • xlogin_options
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/xlogin/html/yahoo/login-btn.php
    • > /wp-content/plugins/xlogin/html/facebook/login-btn.php
  • 89× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\OAuth2\\Client\\Token\\AccessTokenInterface' not found in wp-content/plugins/xlogin/vendor/league/oauth2-client/src/Token/AccessToken.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/xlogin/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/xlogin/vendor/guzzlehttp/promises/src/Promise.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/xlogin/vendor/league/oauth2-facebook/src/Grant/FbExchangeToken.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\OAuth2\\Client\\Provider\\ResourceOwnerInterface' not found in wp-content/plugins/xlogin/vendor/league/oauth2-client/src/Provider/GenericResourceOwner.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Provider\\AbstractProvider' not found in wp-content/plugins/xlogin/vendor/league/oauth2-facebook/src/Provider/Facebook.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\OAuth2\\Client\\Provider\\ResourceOwnerInterface' not found in wp-content/plugins/xlogin/lib/OAuth2/YahooUser.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlogin/init.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xlogin/includes/admin.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/xlogin/vendor/guzzlehttp/psr7/src/UploadedFile.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: facebook, google, yahoo, login, oauth

xlogin/init.php 92% from 13 tests

The main PHP script in "XLogin" version 1.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xlogin.php" instead of "init.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
No dangerous file extensions were detected19,441 lines of code in 199 files:
LanguageFilesBlank linesComment linesLines of code
PHP1482,4397,43811,876
Markdown211,42404,055
JSON13102,204
Vuejs Component456127904
CSS21630147
JavaScript41640135
SVG10149
XML20047
Dockerfile18010
make1409
Bourne Shell2305

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.45
▷ Minimum class complexity1.00
▷ Maximum class complexity203.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces18
Interfaces19
Traits9
Classes91
▷ Abstract classes22.20%
▷ Concrete classes8997.80%
▷ Final classes910.11%
Methods922
▷ Static methods879.44%
▷ Public methods70276.14%
▷ Protected methods9710.52%
▷ Private methods12313.34%
Functions204
▷ Named functions5828.43%
▷ Anonymous functions14671.57%
Constants64
▷ Global constants00.00%
▷ Class constants64100.00%
▷ Public constants64100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/yahoo/btn-signin.png2.70KB1.54KB▼ 43.01%
images/google/btn-signin.png2.63KB1.73KB▼ 34.43%
images/facebook/btn-signin.png5.50KB2.69KB▼ 51.15%