10% payje-for-gravity-forms

Code Review | Swipe for Gravity Forms

WordPress plugin Swipe for Gravity Forms scored10%from 54 tests.

About plugin

  • Plugin page: payje-for-gravity...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2022
  • Latest release: Nov 23, 2022
  • Number of updates: 6
  • Update frequency: every 21.3 days
  • Top authors: payjegateway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /167 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/composer/autoload_real.php+25
    require(wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/composer/platform_check.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by Swipe for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.06 ▼0.81
Dashboard /wp-admin3.31 ▼0.0452.13 ▼7.55
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▼7.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.96 ▼21.52
Media Library /wp-admin/upload.php3.23 ▲0.0035.65 ▼0.44

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 208 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Swipe for Gravity Forms: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.23 ▼1.061.84 ▲0.1143.20 ▼1.79
Dashboard /wp-admin2,221 ▲215.88 ▲0.0799.07 ▼6.5942.07 ▲0.83
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.0434.56 ▼8.3032.93 ▼3.38
Add New Post /wp-admin/post-new.php1,526 ▼517.42 ▼5.67687.44 ▲69.8367.31 ▲14.93
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0197.19 ▼5.3847.45 ▲6.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 53× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require(wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/composer/platform_check.php): failed to open stream: No such file or directory in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/composer/autoload_real.php on line 25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/payje-for-gravity-forms/libraries/payje/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: payment, gravity forms, payje

payje-for-gravity-forms/payje-gf.php 92% from 13 tests

The main PHP file in "Swipe for Gravity Forms" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("payje-for-gravity-forms.php" instead of "payje-gf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin18,371 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1352,4835,93411,254
Markdown171,29003,701
JavaScript55681642,195
JSON13001,073
CSS40073
SVG60159
make1409
YAML1007

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.34
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes87
▷ Abstract classes11.15%
▷ Concrete classes8698.85%
▷ Final classes3439.53%
Methods820
▷ Static methods14317.44%
▷ Public methods68883.90%
▷ Protected methods101.22%
▷ Private methods12214.88%
Functions135
▷ Named functions4432.59%
▷ Anonymous functions9167.41%
Constants74
▷ Global constants912.16%
▷ Class constants6587.84%
▷ Public constants5483.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected