84% integrate-razorpay-contact-form-7

Code Review | Integrate Razorpay for Contact Form 7

WordPress plugin Integrate Razorpay for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: integrate-razorpa...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2022
  • Latest release: Oct 31, 2023
  • Number of updates: 10
  • Update frequency: every 64.1 days
  • Top authors: vinaysaini30 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by Integrate Razorpay for Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.19 ▼8.68
Dashboard /wp-admin3.32 ▼0.0352.89 ▼11.59
Posts /wp-admin/edit.php3.37 ▲0.0148.93 ▲1.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.49 ▼7.18
Media Library /wp-admin/upload.php3.24 ▲0.0134.22 ▲1.79

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

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

Browser metrics Passed 4 tests

Integrate Razorpay for Contact Form 7: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.36 ▼0.231.77 ▲0.1143.57 ▲1.74
Dashboard /wp-admin2,209 ▲295.57 ▼0.0993.92 ▼0.1743.32 ▼1.09
Posts /wp-admin/edit.php2,112 ▲122.03 ▲0.0732.82 ▼5.4237.17 ▲4.01
Add New Post /wp-admin/post-new.php1,539 ▲1323.09 ▼0.12682.94 ▲15.2955.98 ▼2.01
Media Library /wp-admin/upload.php1,411 ▲144.23 ▲0.0398.27 ▼17.8844.91 ▼4.46

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • cf7rzp_options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 63× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/src/Order.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/src/Refund.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/libs/Requests-1.8.0/library/Requests/Exception/HTTP/418.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/src/Webhook.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Errors\\Error' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/src/Errors/ServerError.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/libs/Requests-1.8.0/library/Requests/Exception/HTTP/414.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Resource' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/src/Entity.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Hooker' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/libs/Requests-1.8.0/library/Requests/Hooks.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Errors\\Error' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/src/Errors/GatewayError.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-razorpay-contact-form-7/razorpay-php/libs/Requests-1.8.0/library/Requests/Exception/HTTP/501.php:13

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)
No browser errors were detected

Optimizations

Plugin configuration 96% 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
5 plugin tags: contact form 7, contact form 7 razorpay, contact form, contact form razorpay, razorpay

integrate-razorpay-contact-form-7/integrate-razorpay-for-contact-form-7.php 92% from 13 tests

The primary PHP file in "Integrate Razorpay for Contact Form 7" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("integrate-razorpay-contact-form-7.php" instead of "integrate-razorpay-for-contact-form-7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected5,626 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP981,1983,4314,596
Markdown42730680
JavaScript31613172
JSON20087
XML12041
CSS17032
YAML12118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.70
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces2
Interfaces5
Traits0
Classes81
▷ Abstract classes00.00%
▷ Concrete classes81100.00%
▷ Final classes00.00%
Methods300
▷ Static methods6321.00%
▷ Public methods24280.67%
▷ Protected methods5618.67%
▷ Private methods20.67%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants33
▷ Global constants412.12%
▷ Class constants2987.88%
▷ Public constants29100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/loader-cod.png11.13KB6.50KB▼ 41.61%