83% cf7-google-sheets-connector

Code Review | CF7 Google Sheets Connector

WordPress plugin CF7 Google Sheets Connector scored83%from 54 tests.

About plugin

  • Plugin page: cf7-google-sheets...
  • Plugin version: 5.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 2, 2016
  • Latest release: Oct 5, 2023
  • Number of updates: 90
  • Update frequency: every 28.8 days
  • Top authors: westerndeal (93.33%)sooskriszta (7.78%)

Code review

54 tests

User reviews

113 reviews

Install metrics

40,000+ active /467,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.56ms] Passed 4 tests

Server-side resources used by CF7 Google Sheets Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.30 ▲7.36
Dashboard /wp-admin3.31 ▲0.0047.18 ▲0.93
Posts /wp-admin/edit.php3.36 ▲0.0044.46 ▼3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.01 ▼21.25
Media Library /wp-admin/upload.php3.23 ▲0.0032.36 ▼2.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,086 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
gs_access_code
widget_theysaidso_widget
gs_token
widget_recent-comments
can_compress_scripts
gs_verify
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CF7 Google Sheets Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.051.82 ▲0.2045.79 ▲5.35
Dashboard /wp-admin2,198 ▲215.63 ▼0.0781.12 ▼8.0636.85 ▼3.08
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0134.13 ▼0.1533.93 ▼3.23
Add New Post /wp-admin/post-new.php1,528 ▼023.47 ▲0.20646.73 ▼53.6450.52 ▼5.23
Media Library /wp-admin/upload.php1,400 ▲64.20 ▲0.0092.64 ▼3.3941.97 ▲1.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • gs_verify
    • gs_token
    • can_compress_scripts
    • theysaidso_admin_options
    • gs_access_code
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Almost there! Just fix the following items
  • 668× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Parameters.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/google/apiclient-services/src/Sheets/Interval.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\DES' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\DH' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Parameters.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/google/apiclient-services/src/Sheets/BaselineValueFormat.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/cf7-google-sheets-connector/lib/vendor/google/apiclient-services/src/Sheets/UpdateDeveloperMetadataRequest.php:20
    • > PHP Warning
      Class 'Google\\AuthHandler\\Guzzle7AuthHandler' not found in wp-content/plugins/cf7-google-sheets-connector/lib/src/aliases.php on line 33

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: cf7, contact form 7 integrations, google sheets integrations, sheets, contact form 7...

cf7-google-sheets-connector/google-sheet-connector.php 85% from 13 tests

Analyzing the main PHP file in "CF7 Google Sheets Connector" version 5.0.6
The following require your attention:
  • 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: It is recommended to name the main PHP file as the plugin slug ("cf7-google-sheets-connector.php" instead of "google-sheet-connector.php")

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
No dangerous file extensions were detected83,531 lines of code in 1,044 files:
LanguageFilesBlank linesComment linesLines of code
PHP98313,38256,36174,727
Markdown291,65504,915
JSON19002,065
CSS262351,134
JavaScript33974282
PO File19098267
YAML332102
XML10019
make1409
SVG1008
Bourne Shell1203

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please 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.31
Average class complexity9.26
▷ Minimum class complexity1.00
▷ Maximum class complexity662.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces82
Interfaces50
Traits14
Classes909
▷ Abstract classes21423.54%
▷ Concrete classes69576.46%
▷ Final classes537.63%
Methods5,944
▷ Static methods67811.41%
▷ Public methods5,06985.28%
▷ Protected methods3916.58%
▷ Private methods4848.14%
Functions177
▷ Named functions3519.77%
▷ Anonymous functions14280.23%
Constants531
▷ Global constants203.77%
▷ Class constants51196.23%
▷ Public constants47192.17%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 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/screenshot-1.png31.09KB10.23KB▼ 67.10%
assets/img/permission_screen.png29.71KB9.43KB▼ 68.24%
assets/img/btn_google_signin_dark_pressed_web.png4.14KB2.15KB▼ 48.09%
assets/img/CF7GSheet-Connector-logo.png23.37KB4.89KB▼ 79.07%
assets/img/CF7-GSheetConnector-desktop-img.png101.51KB101.51KB0.00%