84% google-apps-login

Code Review | Login for Google Apps

WordPress plugin Login for Google Apps scored84%from 54 tests.

About plugin

Code review

54 tests

User reviews

64 reviews

Install metrics

10,000+ active /547,367 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼9.89ms] Passed 4 tests

Analyzing server-side resources used by Login for Google Apps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2839.22 ▲0.48
Dashboard /wp-admin3.65 ▲0.3044.91 ▼17.04
Posts /wp-admin/edit.php3.70 ▲0.3446.47 ▼3.01
Add New Post /wp-admin/post-new.php6.16 ▲0.2885.50 ▼19.97
Media Library /wp-admin/upload.php3.51 ▲0.2837.81 ▲3.24
Login for Google Apps /wp-admin/options-general.php?page=galogin_list_options3.4733.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 167 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Login for Google Apps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16714.45 ▼0.301.67 ▼0.2032.69 ▼12.11
Dashboard /wp-admin2,220 ▲314.84 ▼1.08101.51 ▼5.7138.80 ▼7.10
Posts /wp-admin/edit.php2,099 ▲102.05 ▲0.0541.22 ▲6.0136.62 ▲1.35
Add New Post /wp-admin/post-new.php1,534 ▲1423.09 ▲0.15668.67 ▲2.8557.75 ▲3.62
Media Library /wp-admin/upload.php1,399 ▲144.31 ▲0.0898.26 ▲0.8340.12 ▼6.89
Login for Google Apps /wp-admin/options-general.php?page=galogin_list_options1,0842.0625.7435.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 73× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/YouTube.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/Appsactivity.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/CloudMonitoring.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/AdSenseHost.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/Books.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/GroupsMigration.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/Admin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/Doubleclicksearch.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/AppState.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleGAL_Service' not found in wp-content/plugins/google-apps-login/core/Google/Service/Audit.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

google-apps-login/google_apps_login.php 92% from 13 tests

"Login for Google Apps" version 3.4.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-apps-login.php" instead of "google_apps_login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin135,057 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP11812,02527,369119,717
SVG30211,579
PO File128748943,422
CSS2403252
JavaScript1161187

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.30
▷ Minimum class complexity1.00
▷ Maximum class complexity194.00
Average method complexity1.04
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2,510
▷ Abstract classes60.24%
▷ Concrete classes2,50499.76%
▷ Final classes00.00%
Methods19,806
▷ Static methods130.07%
▷ Public methods19,68799.40%
▷ Protected methods850.43%
▷ Private methods340.17%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants227
▷ Global constants00.00%
▷ Class constants227100.00%
▷ Public constants227100.00%

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
11 PNG files occupy 0.22MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/g-normal.png0.52KB0.58KB0.00%
img/btn_google_signin_dark_normal_web.png3.89KB2.09KB▼ 46.20%
img/basic_aioi.png48.96KB17.04KB▼ 65.20%
img/btn_google_signin_light_focus_web.png4.23KB2.15KB▼ 49.17%
img/btn_google_signin_dark_focus_web.png4.09KB2.13KB▼ 47.93%