94% gp-sociallogin

Code Review | GP social login

WordPress plugin GP social login scored 94% from 54 tests.

About plugin

  • Plugin page: gp-sociallogin
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 5.8.1
  • First release: Nov 27, 2015
  • Latest release: Nov 27, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: renemanqueros (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 508 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.03ms] Passed 4 tests

This is a short check of server-side resources used by GP social login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.04 ▲12.77
Dashboard /wp-admin3.11 ▲0.0544.70 ▲3.96
Posts /wp-admin/edit.php3.16 ▲0.0541.66 ▼6.73
Add New Post /wp-admin/post-new.php5.46 ▲0.0390.16 ▼563.36
Media Library /wp-admin/upload.php3.05 ▲0.0534.14 ▲2.03
GP Social Login /wp-admin/options-general.php?page=gp-social-login-admin3.0233.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 199 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by GP social login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.85 ▲0.329.09 ▼0.4845.72 ▼2.44
Dashboard /wp-admin2,978 ▲445.89 ▼0.20136.88 ▼9.11107.15 ▲0.42
Posts /wp-admin/edit.php2,741 ▲22.71 ▲0.0061.56 ▼3.9492.23 ▲2.76
Add New Post /wp-admin/post-new.php1,686 ▲1418.69 ▼0.03383.57 ▲17.13105.43 ▼5.36
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.01167.71 ▲13.55125.90 ▲10.60
GP Social Login /wp-admin/options-general.php?page=gp-social-login-admin1,0822.0863.5689.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 122× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/AppState.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\Http\\RequestBodyInterface' not found in wp-content/plugins/gp-sociallogin/Facebook/Http/RequestBodyMultipart.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/Manager.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/Fusiontables.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/Webfonts.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/IdentityToolkit.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/Script.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/DoubleClickBidManager.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/YouTubeAnalytics.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-sociallogin/Google/Service/Plus.php:31

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: social, google, facebook, login

gp-sociallogin/index.php 92% from 13 tests

The main PHP file in "GP social login" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gp-sociallogin.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin171,428 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP19511,58637,113171,404
Markdown13024

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.28
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.04
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces6
Traits1
Classes3,077
▷ Abstract classes70.23%
▷ Concrete classes3,07099.77%
▷ Final classes00.00%
Methods24,150
▷ Static methods300.12%
▷ Public methods24,04899.58%
▷ Protected methods550.23%
▷ Private methods470.19%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants288
▷ Global constants00.00%
▷ Class constants288100.00%
▷ Public constants288100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin