83% wp-one-tap-google-sign-in

Code Review | Wp One Tap Google Sign In

WordPress plugin Wp One Tap Google Sign In scored83%from 54 tests.

About plugin

  • Plugin page: wp-one-tap-google...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: Oct 16, 2020
  • Number of updates: 11
  • Update frequency: every 1.3 days
  • Top authors: sunilkumarthz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /828 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
Installer ran successfully

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

An overview of server-side resources used by Wp One Tap Google Sign In
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.19 ▼1.82
Dashboard /wp-admin3.34 ▲0.0346.54 ▲2.85
Posts /wp-admin/edit.php3.39 ▲0.0345.58 ▼0.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.53 ▼25.08
Media Library /wp-admin/upload.php3.26 ▲0.0332.62 ▲3.28
One Tap GSI Settings /wp-admin/options-general.php?page=one-tap-gsi-settings3.2331.88

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

Input-output and database impact of this plugin
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 30.91MB)
Filesystem: 12,905 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Wp One Tap Google Sign In: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.65 ▼0.931.91 ▲0.1145.75 ▲1.74
Dashboard /wp-admin2,210 ▲254.87 ▲0.04105.74 ▲1.8142.18 ▲4.23
Posts /wp-admin/edit.php2,093 ▲42.18 ▲0.1934.47 ▼3.4436.84 ▲0.32
Add New Post /wp-admin/post-new.php1,517 ▼1617.63 ▼5.41687.07 ▲76.3852.95 ▼13.25
Media Library /wp-admin/upload.php1,395 ▲74.15 ▼0.0996.37 ▼1.0241.99 ▲1.08
One Tap GSI Settings /wp-admin/options-general.php?page=one-tap-gsi-settings7752.0323.7626.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 4095× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/Directory/Tokens.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/Compute/SourceInstanceParams.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/ServiceUser/SourceContext.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/ArtifactRegistry/Resource/ProjectsLocationsRepositoriesPackagesTags.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/Directory/Schemas.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/Compute/SslPoliciesListAvailableFeaturesResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/ServiceNetworking/Range.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/ServiceConsumerManagement/V1GenerateServiceAccountResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/google/apiclient-services/src/Google/Service/Directory/Resource/TwoStepVerification.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/wp-one-tap-google-sign-in/vendor/psr/http-message/src/ResponseInterface.php:20

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: one tap sign in, wp login, google one tap sign in

wp-one-tap-google-sign-in/wp-onetapgsi.php 85% from 13 tests

The principal PHP file in "Wp One Tap Google Sign In" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-one-tap-google-sign-in.php" instead of "wp-onetapgsi.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected618,608 lines of code in 12,881 files:
LanguageFilesBlank linesComment linesLines of code
PHP12,83331,887382,350612,110
Markdown281,66904,961
JSON16001,460
JavaScript11328
YAML12025
XML10015
make1409

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity633.00
Average method complexity1.07
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces36
Interfaces39
Traits10
Classes12,763
▷ Abstract classes100.08%
▷ Concrete classes12,75399.92%
▷ Final classes240.19%
Methods88,747
▷ Static methods2170.24%
▷ Public methods88,31499.51%
▷ Protected methods1720.19%
▷ Private methods2610.29%
Functions175
▷ Named functions6034.29%
▷ Anonymous functions11565.71%
Constants919
▷ Global constants262.83%
▷ Class constants89397.17%
▷ Public constants87397.76%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin