88% integration-for-cardconnect-and-gravity-forms

Code Review | Integration for CardConnect and Gravity Forms

WordPress plugin Integration for CardConnect and Gravity Forms scored 88% from 54 tests.

About plugin

  • Plugin page: integration-for-c...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 5.9.2
  • First release: Mar 19, 2020
  • Latest release: Feb 17, 2022
  • Number of updates: 10
  • Update frequency: every 70.1 days
  • Top authors: kenjigarland (70%)cornershop (40%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 759 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.41MB] [CPU: ▼301.95ms] Passed 4 tests

A check of server-side resources used by Integration for CardConnect and Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4555.40 ▲6.35
Dashboard /wp-admin3.80 ▲0.4035.15 ▲3.03
Posts /wp-admin/edit.php4.09 ▲0.4540.56 ▲4.89
Add New Post /wp-admin/post-new.php7.35 ▲0.3597.06 ▼1,217.93
Media Library /wp-admin/upload.php3.75 ▲0.4525.04 ▲2.23
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.9027.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 71 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Integration for CardConnect and Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3515.94 ▲0.315.98 ▼0.522.34 ▼0.49
Dashboard /wp-admin2,897 ▲366.14 ▼0.02120.39 ▼14.30157.65 ▼2.92
Posts /wp-admin/edit.php2,696 ▲23.24 ▲0.0062.47 ▼0.51138.85 ▼2.53
Add New Post /wp-admin/post-new.php1,671 ▲1018.68 ▼2.49403.43 ▲0.20154.50 ▲0.79
Media Library /wp-admin/upload.php1,703 ▲55.51 ▲0.02144.82 ▲8.14195.08 ▲12.87
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2122.3753.85102.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/pest/examples/intouch_example.php
  • 34× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/classes/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/action-scheduler.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/classes/ActionScheduler_NullAction.php:6
    • > PHP Fatal error
      Uncaught Pest_Curl_Exec: Failed to connect to localhost port 3000: Connection refused in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/pest/Pest.php:232
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/gravityforms-cardconnect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_LogEntry' not found in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/classes/ActionScheduler_NullLogEntry.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/classes/ActionScheduler_IntervalSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_AdminView_Deprecated' not found in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/vendor/action-scheduler/classes/ActionScheduler_AdminView.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: crm, forms, integration

integration-for-cardconnect-and-gravity-forms/gravityforms-cardconnect.php 85% from 13 tests

The main PHP script in "Integration for CardConnect and Gravity Forms" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("integration-for-cardconnect-and-gravity-forms.php" instead of "gravityforms-cardconnect.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin4,757 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.59
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes811.43%
▷ Concrete classes6288.57%
▷ Final classes00.00%
▷ Static methods389.11%
▷ Public methods30773.62%
▷ Protected methods10224.46%
▷ Private methods81.92%
▷ Named functions17100.00%
▷ Anonymous functions00.00%
▷ Global constants15.00%
▷ Class constants1995.00%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin