76% gsheetconnector-ninja-forms

Code Review | Ninja Forms Google Sheet Connector

WordPress plugin Ninja Forms Google Sheet Connector scored76%from 54 tests.

About plugin

  • Plugin page: gsheetconnector-n...
  • Plugin version: 1.2.12
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 28, 2021
  • Latest release: Oct 12, 2023
  • Number of updates: 45
  • Update frequency: every 17.2 days
  • Top authors: westerndeal (77.78%)abdullah17 (24.44%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /10,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by Ninja Forms Google Sheet Connector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.45 ▼6.05
Dashboard /wp-admin3.31 ▼0.0445.14 ▼19.54
Posts /wp-admin/edit.php3.36 ▲0.0048.38 ▲0.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.02 ▼16.03
Media Library /wp-admin/upload.php3.23 ▲0.0037.01 ▲3.40

Server storage [IO: ▲9.47MB] [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: 1,636 new files
Database: no new tables, 11 new options
New WordPress options
fs_accounts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
njforms_gs_access_code
njforms_gs_verify
widget_recent-posts
fs_active_plugins
fs_debug_mode
...

Browser metrics Passed 4 tests

Checking browser requirements for Ninja Forms Google Sheet Connector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.171.59 ▼0.0441.04 ▼1.09
Dashboard /wp-admin2,195 ▲215.55 ▼0.1282.87 ▼20.0939.54 ▼2.45
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0139.90 ▼1.0236.37 ▲3.26
Add New Post /wp-admin/post-new.php1,526 ▼522.79 ▼0.49661.53 ▲51.2252.56 ▲4.55
Media Library /wp-admin/upload.php1,400 ▼34.17 ▲0.0194.71 ▼0.8641.96 ▲1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 11 options
    • njforms_gs_verify
    • widget_theysaidso_widget
    • can_compress_scripts
    • njforms_gs_access_code
    • fs_active_plugins
    • fs_accounts
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_debug_mode
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gsheetconnector-ninja-forms/includes/Config/PluginSettings.php
  • 990× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/google/apiclient-services/src/Sheets/RefreshDataSourceResponse.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/google/apiclient-services/src/Google/Service/Drive/Channel.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/google/apiclient-services/src/Drive/DriveFileCapabilities.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/DeleteDuplicatesRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/google/apiclient-services/src/Google/Service/Sheets/FindReplaceResponse.php:18
    • > PHP Fatal error
      Uncaught Exception: This library must be installed via composer or by downloading the full package. See the instructions at https://github.com/google/google-api-php-client#installation. in wp-content/plugins/gsheetconnector-ninja-forms/lib/src/autoload.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Base' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/google/apiclient-services/src/Drive/DriveFileContentHints.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/gsheetconnector-ninja-forms/lib/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

gsheetconnector-ninja-forms/gsheetconnector-ninjaforms.php 69% from 13 tests

The principal PHP file in "Ninja Forms Google Sheet Connector" v. 1.2.12 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gsheetconnector-ninja-forms.php" instead of "gsheetconnector-ninjaforms.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected137,713 lines of code in 1,537 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,43622,53885,738126,797
Markdown351,90705,595
JSON24002,126
PO File44566221,664
CSS158647768
JavaScript55280328
YAML9332235
Python1222577
XML53072
HTML10039
make1409
Bourne Shell1203

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,088)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.51
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces85
Interfaces50
Traits15
Classes1,288
▷ Abstract classes22017.08%
▷ Concrete classes1,06882.92%
▷ Final classes565.24%
Methods9,898
▷ Static methods8898.98%
▷ Public methods8,62687.15%
▷ Protected methods4094.13%
▷ Private methods8638.72%
Functions300
▷ Named functions15852.67%
▷ Anonymous functions14247.33%
Constants730
▷ Global constants11716.03%
▷ Class constants61383.97%
▷ Public constants57393.47%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.20MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/permission_screen.png29.71KB9.43KB▼ 68.24%
assets/img/faq-screenshot1.png35.82KB14.86KB▼ 58.52%
assets/img/faq-screenshot2.png47.31KB23.50KB▼ 50.33%
assets/img/help.png1.51KB1.35KB▼ 10.25%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%