68% wpgsi

Code Review | Spreadsheet Integration – Automate Google Sheets With WordPress, WooCommerce & Most Popular Form Plugins. Also, Display Google sheet as a Table.

WordPress plugin Spreadsheet Integration – Automate Google Sheets With WordPress, WooCommerce & Most Popular Form Plugins. Also, Display Google sheet as a Table. scored68%from 54 tests.

About plugin

  • Plugin page: wpgsi
  • Plugin version: 3.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: Sep 2, 2023
  • Number of updates: 162
  • Update frequency: every 7.8 days
  • Top authors: javmah (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active /32,973 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.31MB] [CPU: ▲33.65ms] 75% from 4 tests

An overview of server-side resources used by Spreadsheet Integration – Automate Google Sheets With WordPress, WooCommerce & Most Popular Form Plugins. Also, Display Google sheet as a Table.
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.31MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.93 ▲5.4678.01 ▲36.70
Dashboard /wp-admin8.95 ▲5.6484.64 ▲33.48
Posts /wp-admin/edit.php8.95 ▲5.5996.18 ▲41.45
Add New Post /wp-admin/post-new.php10.42 ▲4.53122.71 ▲22.97
Media Library /wp-admin/upload.php8.95 ▲5.7288.70 ▲51.72
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius8.9572.14

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 288 new files
Database: no new tables, 10 new options
New WordPress options
fs_active_plugins
fs_accounts
widget_recent-comments
wpgsi_installed
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
fs_debug_mode

Browser metrics Passed 4 tests

A check of browser resources used by Spreadsheet Integration – Automate Google Sheets With WordPress, WooCommerce & Most Popular Form Plugins. Also, Display Google sheet as a Table.
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17113.82 ▼0.768.14 ▲6.0927.90 ▼18.94
Dashboard /wp-admin2,227 ▲505.56 ▼0.1097.49 ▲1.5449.13 ▲11.39
Posts /wp-admin/edit.php2,136 ▲361.97 ▼0.0540.46 ▼0.2140.11 ▲5.24
Add New Post /wp-admin/post-new.php1,554 ▲2624.30 ▲1.02657.84 ▼11.1962.77 ▲2.36
Media Library /wp-admin/upload.php1,435 ▲354.17 ▲0.0398.21 ▼7.0246.93 ▲0.08
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius1,1031.6927.0630.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wpgsi/includes/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • fs_debug_mode
    • fs_accounts
    • theysaidso_admin_options
    • wpgsi_installed
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wpgsi/public/partials/wpgsi-public-display.php
    • > /wp-content/plugins/wpgsi/admin/partials/wpgsi-admin-display.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/wpgsi-showClass-newAndEditShowView.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/edit-integration.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/service-account-help.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpgsi/includes/class-wpgsi-google-sheet.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/wpgsi-service-ac-help-display.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/wpgsi-settings-display.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/new-integration.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/wpgsi-showClass-landingView.php:5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpgsi/includes/class-wpgsi-list-table.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wpgsi/admin/partials/wpgsi-remoteUpdate.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: automation, spreadsheet, google, google-sheets, woocommerce...

wpgsi/wpgsi.php Passed 13 tests

The main PHP script in "Spreadsheet Integration – Automate Google Sheets With WordPress, WooCommerce & Most Popular Form Plugins. Also, Display Google sheet as a Table." version 3.7.9 is automatically included on every request by WordPress
103 characters long description:
Spreadsheet Integration, Connects WordPress events and most popular plugin with Google Sheets via API.

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected51,991 lines of code in 194 files:
LanguageFilesBlank linesComment linesLines of code
PHP1628,96620,23641,158
JavaScript101,1971,69910,497
Markdown1320168
JSON30092
CSS1681754
XML13016
INI1006

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,087)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity80.97
▷ Minimum class complexity1.00
▷ Maximum class complexity3,087.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods1,469
▷ Static methods22215.11%
▷ Public methods1,06372.36%
▷ Protected methods171.16%
▷ Private methods38926.48%
Functions105
▷ Named functions10499.05%
▷ Anonymous functions10.95%
Constants149
▷ Global constants9966.44%
▷ Class constants5033.56%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
39 PNG files occupy 3.81MB with 2.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/freemius/assets/img/wpgsi.png37.15KB9.59KB▼ 74.19%
admin/css/screenshot-17-plus.png129.61KB46.18KB▼ 64.37%
includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/css/screenshot-8-plus.png121.35KB43.26KB▼ 64.35%
admin/css/screenshot-8.png57.21KB20.43KB▼ 64.29%