83% gsheetconnector-gravity-forms

Code Review | Gravity Forms Google Sheet Connector

WordPress plugin Gravity Forms Google Sheet Connector scored83%from 54 tests.

About plugin

  • Plugin page: gsheetconnector-g...
  • Plugin version: 1.3.10
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Nov 25, 2023
  • Number of updates: 56
  • Update frequency: every 23.6 days
  • Top authors: westerndeal (75%)abdullah17 (26.79%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /6,571 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.01MB] [CPU: ▼8.75ms] Passed 4 tests

A check of server-side resources used by Gravity Forms Google Sheet Connector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.22 ▼8.74
Dashboard /wp-admin3.31 ▼0.0443.67 ▼17.31
Posts /wp-admin/edit.php3.36 ▲0.0047.79 ▲3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.22 ▼10.76
Media Library /wp-admin/upload.php3.23 ▲0.0032.38 ▲1.83

Server storage [IO: ▲5.91MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,395 new files
Database: no new tables, 10 new options
New WordPress options
gfgs_token
gfgs_access_code
gfgs_feeds
gfgs_verify
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms Google Sheet Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▼0.091.76 ▲0.1038.00 ▼5.41
Dashboard /wp-admin2,195 ▲155.60 ▼0.03110.96 ▲15.4439.46 ▼3.88
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0940.42 ▲0.5636.97 ▲3.56
Add New Post /wp-admin/post-new.php1,526 ▼1123.34 ▲0.27648.79 ▲5.9861.24 ▲7.72
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0493.53 ▼4.2141.66 ▲0.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Please fix the following items
  • 970× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Revisions.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Files.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\Curves\\sect233r1' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistb233.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/google/apiclient-services/src/Sheets/Color.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp112r1.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/google/apiclient-services/src/Sheets/DeveloperMetadataLocation.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php:28
    • > PHP Fatal error
      Trait 'Google\\Auth\\CacheTrait' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/google/auth/src/GCECache.php on line 38
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Binary' not found in wp-content/plugins/gsheetconnector-gravity-forms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163k1.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: gravity forms to google sheet, google sheets, gravity forms google sheets, gravity forms google sheet, gravity forms google drive...

gsheetconnector-gravity-forms/gsheetconnector-gravityforms.php 85% from 13 tests

"Gravity Forms Google Sheet Connector" version 1.3.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gsheetconnector-gravity-forms.php" instead of "gsheetconnector-gravityforms.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin101,030 lines of code in 1,351 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,29014,45567,69292,340
Markdown311,73305,063
JSON19002,065
CSS111857919
JavaScript15335242
PO File181108228
YAML452127
XML20034
make1409
Bourne Shell1203

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.56
▷ Minimum class complexity1.00
▷ Maximum class complexity662.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces85
Interfaces50
Traits14
Classes1,217
▷ Abstract classes21517.67%
▷ Concrete classes1,00282.33%
▷ Final classes535.29%
Methods8,547
▷ Static methods6817.97%
▷ Public methods7,66989.73%
▷ Protected methods3914.57%
▷ Private methods4875.70%
Functions201
▷ Named functions5929.35%
▷ Anonymous functions14270.65%
Constants582
▷ Global constants162.75%
▷ Class constants56697.25%
▷ Public constants52692.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/faq-screenshot-3.png65.90KB20.78KB▼ 68.47%
assets/image/GravityGSheet-Connector-logo.png23.37KB4.89KB▼ 79.07%
assets/image/btn_google_signin_dark_pressed_web.png4.14KB2.15KB▼ 48.09%
assets/image/help.png1.51KB1.35KB▼ 10.25%
assets/image/faq-screenshot-2.png26.93KB9.91KB▼ 63.22%