94% gp-google-login

Code Review | GP Google login

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

About plugin

  • Plugin page: gp-google-login
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 5.8.1
  • First release: Apr 7, 2016
  • Latest release: Dec 28, 2020
  • Number of updates: 11
  • Update frequency: every 157.0 days
  • Top authors: ganeshpaygude (90.91%)clarionwpdeveloper (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,879 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▼141.48ms] Passed 4 tests

Server-side resources used by GP Google login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.23 ▲0.5141.05 ▲17.87
Dashboard /wp-admin3.45 ▲0.4054.87 ▲3.62
Posts /wp-admin/edit.php3.51 ▲0.4050.18 ▲3.50
Add New Post /wp-admin/post-new.php5.81 ▲0.3895.35 ▼574.34
Media Library /wp-admin/upload.php3.40 ▲0.4037.94 ▲1.30
GP Google Login /wp-admin/options-general.php?page=gp-google-login/index.php3.3731.59

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 138 new files
Database: no new tables, 1 new option
New WordPress options
Gp_google_login_options

Browser metrics Passed 4 tests

GP Google login: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲11515.87 ▲0.398.46 ▼4.1746.98 ▼6.95
Dashboard /wp-admin2,972 ▲415.88 ▼0.06151.49 ▲0.66112.86 ▼6.96
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0072.90 ▲2.9494.78 ▼3.71
Add New Post /wp-admin/post-new.php1,612 ▼7118.91 ▲0.17374.96 ▼19.23115.89 ▲4.38
Media Library /wp-admin/upload.php1,812 ▲55.04 ▲0.02163.77 ▲18.07121.40 ▼1.46
GP Google Login /wp-admin/options-general.php?page=gp-google-login/index.php1,0502.0858.6584.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 82× 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-google-login/libraries/Google/Service/Urlshortener.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Books.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Compute.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Groupssettings.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Cloudlatencytest.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/AdSenseHost.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Datastore.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Playmoviespartner.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/Coordinate.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/gp-google-login/libraries/Google/Service/GamesConfiguration.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
You can take inspiration from this readme.txt

gp-google-login/index.php 92% from 13 tests

This is the main PHP file of "GP Google login" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gp-google-login.php" instead of "index.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
There were no executable files found in this plugin166,933 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP13310,68832,128166,929
CSS1004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.01
Average class complexity1.19
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.02
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3,009
▷ Abstract classes60.20%
▷ Concrete classes3,00399.80%
▷ Final classes00.00%
Methods23,634
▷ Static methods140.06%
▷ Public methods23,55999.68%
▷ Protected methods300.13%
▷ Private methods450.19%
Functions18
▷ Named functions1583.33%
▷ Anonymous functions316.67%
Constants260
▷ Global constants31.15%
▷ Class constants25798.85%
▷ Public constants257100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-1.png32.49KB11.78KB▼ 63.75%
images/google-login-button.png4.40KB2.30KB▼ 47.74%