77% gsheetconnector-wpforms

Code Review | WPForms Google Sheet Connector

WordPress plugin WPForms Google Sheet Connector scored77%from 54 tests.

About plugin

  • Plugin page: gsheetconnector-w...
  • Plugin version: 3.4.16
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 65
  • Update frequency: every 27.5 days
  • Top authors: westerndeal (67.69%)abdullah17 (33.85%)

Code review

54 tests

User reviews

13 reviews

Install metrics

6,000+ active /68,671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.73ms] Passed 4 tests

A check of server-side resources used by WPForms Google Sheet Connector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.21 ▼6.61
Dashboard /wp-admin3.31 ▼0.0444.86 ▼16.40
Posts /wp-admin/edit.php3.36 ▲0.0047.19 ▼0.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.75 ▼23.56
Media Library /wp-admin/upload.php3.23 ▲0.0035.72 ▲2.84
Google Sheet /wp-admin/admin.php?page=wpform-google-sheet-config3.0023.95

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,463 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
wpform_gs_verify
wpform_uninstall
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
wpform_gs_token
wpform_gs_access_code

Browser metrics Passed 4 tests

A check of browser resources used by WPForms Google Sheet Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.17 ▼0.181.82 ▲0.1539.99 ▼3.64
Dashboard /wp-admin2,198 ▲215.62 ▲0.0186.42 ▼4.0539.21 ▼2.13
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0535.99 ▼1.5829.03 ▼5.15
Add New Post /wp-admin/post-new.php1,533 ▲523.02 ▼0.07601.63 ▼74.8248.83 ▼2.71
Media Library /wp-admin/upload.php1,400 ▼34.26 ▲0.0395.38 ▼2.5640.94 ▼4.09
Google Sheet /wp-admin/admin.php?page=wpform-google-sheet-config280.420.093.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • wpform_uninstall
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 992× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/google/apiclient-services/src/Sheets/IterativeCalculationSettings.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/CopySheetToAnotherSpreadsheetRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/guzzlehttp/psr7/src/FnStream.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\Curves\\secp224r1' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp224.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/DeleteDuplicatesResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/google/apiclient-services/src/Sheets/Padding.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS8' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/google/apiclient-services/src/Sheets/UpdateProtectedRangeRequest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/gsheetconnector-wpforms/lib/vendor/google/apiclient-services/src/Drive/ReplyList.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=wpform-google-sheet-config
    • > Network (severe)
    wp-admin/admin.php?page=wpform-google-sheet-config - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #4, #5, #6, #7, #8 in gsheetconnector-wpforms/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

gsheetconnector-wpforms/gsheetconnector-wpforms.php 85% from 13 tests

"WPForms Google Sheet Connector" version 3.4.16's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected107,644 lines of code in 1,408 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,31915,06768,77694,982
Markdown341,83905,381
PO File56807352,610
JSON23002,099
CSS5137811,936
JavaScript46876238
YAML9332235
Python1222577
XML40056
Dockerfile18010
make1409
SVG1008
Bourne Shell1203

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.64
▷ Minimum class complexity1.00
▷ Maximum class complexity662.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces85
Interfaces50
Traits15
Classes1,242
▷ Abstract classes21817.55%
▷ Concrete classes1,02482.45%
▷ Final classes555.37%
Methods8,695
▷ Static methods6927.96%
▷ Public methods7,80089.71%
▷ Protected methods3994.59%
▷ Private methods4965.70%
Functions201
▷ Named functions5929.35%
▷ Anonymous functions14270.65%
Constants584
▷ Global constants183.08%
▷ Class constants56696.92%
▷ 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.22MB with 0.11MB 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/permission_screen.png29.71KB9.43KB▼ 68.24%
assets/img/faq-screenshot1.png7.26KB3.17KB▼ 56.39%
assets/img/new_settings_screenshot.png54.61KB20.78KB▼ 61.95%
assets/img/btn_google_signin_dark_pressed_web.png4.14KB2.15KB▼ 48.09%