84% login-with-google

Code Review | Log in with Google

WordPress plugin Log in with Google scored84%from 54 tests.

About plugin

  • Plugin page: login-with-google
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2020
  • Latest release: Sep 6, 2023
  • Number of updates: 33
  • Update frequency: every 32.5 days
  • Top authors: rtcamp (75.76%)pavanpatil1 (12.12%)vaishu.agola27 (12.12%)honesthacker (6.06%)juhise (6.06%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /29,097 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▲1.76ms] Passed 4 tests

Analyzing server-side resources used by Log in with Google
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4446.61 ▲4.95
Dashboard /wp-admin3.74 ▲0.4460.55 ▲7.33
Posts /wp-admin/edit.php3.79 ▲0.4353.82 ▲2.84
Add New Post /wp-admin/post-new.php6.32 ▲0.4388.55 ▼8.07
Media Library /wp-admin/upload.php3.66 ▲0.4345.09 ▲9.37
Login with Google /wp-admin/options-general.php?page=login-with-google3.5635.84

Server storage [IO: ▲0.96MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/login-with-google/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 82 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Log in with Google
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10013.23 ▼1.144.74 ▲2.0127.99 ▼12.18
Dashboard /wp-admin2,222 ▲225.82 ▼0.0096.27 ▼4.3938.04 ▼4.25
Posts /wp-admin/edit.php2,101 ▲12.02 ▼0.0334.43 ▼1.4932.93 ▼1.94
Add New Post /wp-admin/post-new.php6,367 ▲4,84127.70 ▲10.00916.20 ▲309.3640.96 ▼9.10
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0697.06 ▼1.2344.75 ▼0.43
Login with Google /wp-admin/options-general.php?page=login-with-google8861.6923.8326.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/login-with-google/vendor/psr/container/src/NotFoundExceptionInterface.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Psr11/Container.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'RtCamp\\GoogleLogin\\Interfaces\\Module' not found in wp-content/plugins/login-with-google/src/Modules/Settings.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'RtCamp\\GoogleLogin\\Interfaces\\Module' not found in wp-content/plugins/login-with-google/src/Modules/Shortcode.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'RtCamp\\GoogleLogin\\Interfaces\\Module' not found in wp-content/plugins/login-with-google/src/Modules/OneTapLogin.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'RtCamp\\GoogleLogin\\Interfaces\\Module' not found in wp-content/plugins/login-with-google/src/Modules/Block.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'RtCamp\\GoogleLogin\\Interfaces\\Module' not found in wp-content/plugins/login-with-google/src/Modules/Assets.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
8 plugin tags: oauth, sign-in, single sign-on, authentication, sign in...

login-with-google/login-with-google.php Passed 13 tests

"Log in with Google" version 1.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
41 characters long description:
Allow users to login/register via Google.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin20,303 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
JSON70017,101
PHP507802,3212,835
JavaScript72446118
reStructuredText19613997
XML312578
Sass114073
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.08
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces6
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes26.06%
Methods222
▷ Static methods229.91%
▷ Public methods20793.24%
▷ Protected methods00.00%
▷ Private methods156.76%
Functions72
▷ Named functions45.56%
▷ Anonymous functions6894.44%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/build/images/google_light.png1.73KB1.70KB▼ 1.92%
assets/src/images/google_light.png1.73KB1.70KB▼ 1.92%