10% gsheetconnector-caldera-forms

Code Review | Caldera Forms Google Sheets Connector

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

About plugin

  • Plugin page: gsheetconnector-c...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2020
  • Latest release: Sep 11, 2023
  • Number of updates: 17
  • Update frequency: every 62.6 days
  • Top authors: westerndeal (88.24%)abdullah17 (17.65%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 6,467 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no 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.43MB] [CPU: ▼4.36ms] Passed 4 tests

An overview of server-side resources used by Caldera Forms Google Sheets Connector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4746.57 ▲5.33
Dashboard /wp-admin3.77 ▲0.4652.79 ▼5.28
Posts /wp-admin/edit.php3.82 ▲0.4649.41 ▼2.18
Add New Post /wp-admin/post-new.php6.29 ▲0.4086.72 ▼15.32
Media Library /wp-admin/upload.php3.63 ▲0.4041.51 ▲7.36
Google Sheets /wp-admin/admin.php?page=caldera-forms-gsheet-sheet-config3.6235.83

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 710 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
cf_gs_verify
db_upgraded
widget_recent-posts
cf_gs_access_code
can_compress_scripts
cf_gs_token
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Caldera Forms Google Sheets Connector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.32 ▼1.055.12 ▲3.1046.27 ▼2.90
Dashboard /wp-admin2,203 ▲184.85 ▼1.03113.41 ▼8.7643.11 ▼6.09
Posts /wp-admin/edit.php2,089 ▲182.01 ▼0.0136.76 ▼0.8033.18 ▲0.26
Add New Post /wp-admin/post-new.php1,534 ▲623.25 ▲5.17690.35 ▲36.4149.53 ▼16.08
Media Library /wp-admin/upload.php1,391 ▲64.37 ▲0.17102.89 ▼7.6545.36 ▼3.50
Google Sheets /wp-admin/admin.php?page=caldera-forms-gsheet-sheet-config8622.0330.2835.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • cf_gs_token
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • cf_gs_access_code
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • cf_gs_verify

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 495× PHP files trigger server errors when accessed directly (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/UpdateFilterViewRequest.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/CouchDBHandlerTest.php:17
    • > 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/BasicChartSpec.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/Oauth2/Userinfoplus.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/Processor/IntrospectionProcessorTest.php:33
    • > 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/LogstashFormatterTest.php:16
    • > 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/PivotValue.php:18
    • > 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/ScalarFormatterTest.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gsheetconnector-caldera-forms/includes/pages/caldera-integration-demo-info.php:4
    • > 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/Padding.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: google sheets integrations, google sheet, contact forms, caldera forms, google...

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

Analyzing the main PHP file in "Caldera Forms Google Sheets Connector" version 1.3
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected67,767 lines of code in 675 files:
LanguageFilesBlank linesComment linesLines of code
PHP62310,07133,41561,134
Markdown271,31804,361
JSON14001,072
CSS24616768
JavaScript21864192
PO File15356150
XML33043
YAML29038
make1409

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.09
▷ Minimum class complexity1.00
▷ Maximum class complexity626.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces38
Interfaces25
Traits5
Classes613
▷ Abstract classes101.63%
▷ Concrete classes60398.37%
▷ Final classes91.49%
Methods4,936
▷ Static methods1472.98%
▷ Public methods4,47990.74%
▷ Protected methods2054.15%
▷ Private methods2525.11%
Functions250
▷ Named functions6927.60%
▷ Anonymous functions18172.40%
Constants351
▷ Global constants298.26%
▷ Class constants32291.74%
▷ Public constants322100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.49MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/help.png1.51KB1.35KB▼ 10.25%
assets/img/google-sheet-logo.png3.11KB2.06KB▼ 33.55%
assets/img/GSheet-Connector_1.png5.61KB5.57KB▼ 0.66%
assets/img/caldera.png486.26KB142.77KB▼ 70.64%
assets/img/btn_google_signin_dark_pressed_web.png4.14KB2.15KB▼ 48.09%