84% one-tap-google-sign-in

Code Review | One Tap Google Sign in

WordPress plugin One Tap Google Sign in scored84%from 54 tests.

About plugin

  • Plugin page: one-tap-google-si...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 7, 2020
  • Latest release: Dec 17, 2022
  • Number of updates: 11
  • Update frequency: every 78.4 days
  • Top authors: surendhar153 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

900+ active /6,548 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by One Tap Google Sign in
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.69 ▼2.94
Dashboard /wp-admin3.32 ▲0.0246.29 ▼1.50
Posts /wp-admin/edit.php3.37 ▲0.0148.64 ▲2.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.36 ▼2.48
Media Library /wp-admin/upload.php3.24 ▲0.0133.34 ▼3.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 388 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for One Tap Google Sign in
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲12313.84 ▼0.534.07 ▲2.1740.28 ▼3.91
Dashboard /wp-admin2,221 ▲304.81 ▼1.08106.21 ▲1.2741.61 ▲1.31
Posts /wp-admin/edit.php2,104 ▲152.03 ▼0.0139.64 ▲4.0436.64 ▲6.10
Add New Post /wp-admin/post-new.php1,543 ▲2923.25 ▲5.76574.64 ▼115.5246.19 ▼9.92
Media Library /wp-admin/upload.php1,400 ▲154.17 ▼0.0393.06 ▼19.1040.53 ▼8.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 180× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Google\\Auth\\FetchAuthTokenInterface' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/google/auth/src/SignBlobInterface.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/psr/http-client/src/NetworkExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php:22
    • > PHP Fatal error
      Uncaught Exception: This library must be installed via composer or by downloading the full package. See the instructions at https://github.com/google/google-api-php-client#installation. in wp-content/plugins/one-tap-google-sign-in/includes/vendor/google/apiclient/src/Google/autoload.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\HttpHandler\\Guzzle6HttpHandler' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/google/auth/src/HttpHandler/Guzzle7HttpHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/one-tap-google-sign-in/includes/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: you only login once, login, yolo, one tap, social login...

one-tap-google-sign-in/one-tap-google-sign-in.php Passed 13 tests

The main file in "One Tap Google Sign in" v. 1.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
One Tap Google Sign in for wordpress

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 plugin47,839 lines of code in 365 files:
LanguageFilesBlank linesComment linesLines of code
PHP3198,21926,13641,564
Markdown281,57404,792
JSON16001,449
YAML12025
make1409

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.34
▷ Minimum class complexity1.00
▷ Maximum class complexity632.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces36
Interfaces36
Traits10
Classes254
▷ Abstract classes103.94%
▷ Concrete classes24496.06%
▷ Final classes145.74%
Methods2,414
▷ Static methods1707.04%
▷ Public methods1,98682.27%
▷ Protected methods1727.13%
▷ Private methods25610.60%
Functions173
▷ Named functions6034.68%
▷ Anonymous functions11365.32%
Constants361
▷ Global constants298.03%
▷ Class constants33291.97%
▷ Public constants31293.98%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.07MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/google.png0.52KB0.58KB0.00%
assets/images/get-me-a-coffee.png74.38KB71.23KB▼ 4.24%