10% gsheetconnector-caldera-forms

Code Review | Caldera Google Sheets Connector

WordPress plugin Caldera Google Sheets Connector scored 10% from 54 tests.

About plugin

  • Plugin page: gsheetconnector-c...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4.2
  • WordPress version: 5.9.2
  • First release: Oct 14, 2020
  • Latest release: Jan 24, 2022
  • Number of updates: 9
  • Update frequency: every 52.1 days
  • Top authors: westerndeal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 2,197 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/gsheetconnector-caldera-forms/gsheetconnector-caldera-forms.php+273
    Undefined variable: google_sheet_info

Server metrics [RAM: ▼0.02MB] [CPU: ▼290.67ms] Passed 4 tests

Server-side resources used by Caldera Google Sheets Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4056.39 ▲37.11
Dashboard /wp-admin3.41 ▲0.0039.23 ▲6.97
Posts /wp-admin/edit.php3.65 ▲0.0036.35 ▼2.21
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.57 ▼1,166.88
Media Library /wp-admin/upload.php3.30 ▲0.0024.41 ▼0.56
Google Sheets /wp-admin/admin.php?page=caldera-forms-gsheet-sheet-config3.1018.14

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 709 new files
Database: no new tables, 3 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Caldera Google Sheets Connector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,749 ▼515.58 ▼0.405.91 ▼0.692.26 ▼0.60
Dashboard /wp-admin2,874 ▲136.04 ▼0.12121.66 ▼18.38155.77 ▼11.92
Posts /wp-admin/edit.php2,694 ▲33.23 ▼0.0063.71 ▼2.14137.66 ▼8.03
Add New Post /wp-admin/post-new.php1,690 ▼2120.63 ▼0.00442.91 ▼5.37161.92 ▲0.77
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.10143.82 ▼7.30187.07 ▼3.24
Google Sheets /wp-admin/admin.php?page=caldera-forms-gsheet-sheet-config280.940.0619.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 3 options
    • cf_gs_token
    • cf_gs_verify
    • cf_gs_access_code

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 495× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/DeleteDimensionRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/DeleteDimensionGroupResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/BatchUpdateSpreadsheetRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/GridProperties.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/AddChartResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/Resource/Spreadsheets.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/google/apiclient-services/src/Google/Service/Drive/TeamDriveList.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gsheetconnector-caldera-forms/lib/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=caldera-forms-gsheet-sheet-config
    • > Network (severe)
    wp-admin/admin.php?page=caldera-forms-gsheet-sheet-config - Failed to load resource: the server responded with a status of 403 (Forbidden)


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
Please take inspiration from this readme.txt

gsheetconnector-caldera-forms/gsheetconnector-caldera-forms.php 92% from 13 tests

The principal PHP file in "Caldera Google Sheets Connector" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • 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 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected67,630 lines of code in 675 files:
LanguageFilesBlank linesComment linesLines of code
PO File15054141

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.07
▷ Minimum class complexity1.00
▷ Maximum class complexity626.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
▷ Abstract classes101.63%
▷ Concrete classes60398.37%
▷ Final classes91.49%
▷ Static methods1462.96%
▷ Public methods4,47490.73%
▷ Protected methods2054.16%
▷ Private methods2525.11%
▷ Named functions6927.60%
▷ Anonymous functions18172.40%
▷ Global constants298.29%
▷ Class constants32191.71%
▷ Public constants321100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.48MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/help.png1.51KB1.35KB▼ 10.25%
assets/img/GSheet-Connector_1.png5.61KB5.57KB▼ 0.66%
assets/img/caldera.png486.26KB142.77KB▼ 70.64%
assets/img/google-sheet-logo.png3.11KB2.06KB▼ 33.55%