84% razorpay-gravity-forms

Code Review | Razorpay for Gravity Forms

WordPress plugin Razorpay for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: razorpay-gravity-...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2019
  • Latest release: Jun 14, 2023
  • Number of updates: 21
  • Update frequency: every 65.2 days
  • Top authors: razorpay (61.9%)ramprak (33.33%)chetangn (14.29%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /9,380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Razorpay for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.97 ▼2.59
Dashboard /wp-admin3.31 ▼0.0345.76 ▼17.02
Posts /wp-admin/edit.php3.36 ▲0.0154.68 ▲11.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.30 ▼2.44
Media Library /wp-admin/upload.php3.24 ▲0.0133.85 ▼0.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 177 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Razorpay for Gravity Forms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▼0.171.74 ▼0.1839.10 ▼6.20
Dashboard /wp-admin2,206 ▲155.91 ▲1.01107.40 ▼13.5040.83 ▼1.70
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0639.85 ▲1.3335.53 ▲0.59
Add New Post /wp-admin/post-new.php1,541 ▲818.27 ▼4.91615.05 ▼53.7062.32 ▲11.00
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0397.92 ▼4.6342.77 ▼1.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 110× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_Transport' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.7.0/library/Requests/Exception/Transport/cURL.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.7.0/library/Requests/Exception/HTTP/405.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.7.0/library/Requests/Exception/HTTP/504.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Hooker' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.8.0/library/Requests/Hooks.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/src/Invoice.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.8.0/library/Requests/Exception/HTTP/511.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.7.0/library/Requests/Exception/HTTP/403.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.7.0/library/Requests/Exception/HTTP/411.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Proxy' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/libs/Requests-1.7.0/library/Requests/Proxy/HTTP.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/razorpay-gravity-forms/razorpay-sdk/src/Order.php:5

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: ecommerce, payments, razorpay, india, gravityforms

razorpay-gravity-forms/razorpay.php 92% from 13 tests

"Razorpay for Gravity Forms" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("razorpay-gravity-forms.php" instead of "razorpay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,184 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1481,9126,5727,756
Markdown750001,081
JSON300110
CSS116174
YAML311666
JavaScript218456
XML12041

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.91
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces2
Interfaces9
Traits0
Classes141
▷ Abstract classes00.00%
▷ Concrete classes141100.00%
▷ Final classes00.00%
Methods543
▷ Static methods11721.55%
▷ Public methods44581.95%
▷ Protected methods9417.31%
▷ Private methods40.74%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants70
▷ Global constants22.86%
▷ Class constants6897.14%
▷ Public constants68100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin