83% wcmp-razorpay-split-payment

Code Review | MultiVendorX Razorpay Split Payment

WordPress plugin MultiVendorX Razorpay Split Payment scored83%from 54 tests.

About plugin

  • Plugin page: wcmp-razorpay-spl...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0.2
  • WordPress version: 6.3.1
  • First release: May 29, 2021
  • Latest release: Oct 19, 2022
  • Number of updates: 7
  • Update frequency: every 72.7 days
  • Top authors: wcmp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,859 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by MultiVendorX Razorpay Split Payment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.80 ▼3.64
Dashboard /wp-admin3.32 ▼0.0344.69 ▼13.70
Posts /wp-admin/edit.php3.37 ▲0.0144.76 ▼3.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.53 ▼16.49
Media Library /wp-admin/upload.php3.24 ▲0.0135.05 ▼1.88

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

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

Browser metrics Passed 4 tests

MultiVendorX Razorpay Split Payment: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.18 ▼1.201.69 ▼0.0140.06 ▲1.28
Dashboard /wp-admin2,222 ▲334.86 ▼0.07102.88 ▼2.4441.49 ▼2.74
Posts /wp-admin/edit.php2,102 ▲162.00 ▲0.0141.33 ▲7.5035.37 ▲2.57
Add New Post /wp-admin/post-new.php1,546 ▲923.35 ▲0.23671.82 ▼8.3553.23 ▼2.98
Media Library /wp-admin/upload.php1,404 ▲164.21 ▼0.0595.44 ▼6.6941.78 ▼2.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 54× 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_HTTP' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Exception/HTTP/428.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Exception/HTTP/431.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Exception/HTTP/411.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Exception/HTTP/505.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/src/Customer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/src/Transfer.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Auth' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Auth/Basic.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Api\\Entity' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/src/Order.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Exception/HTTP/408.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Transport' not found in wp-content/plugins/wcmp-razorpay-split-payment/razorpay-sdk/libs/Requests-1.6.1/library/Requests/Transport/fsockopen.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Payment Gateway Settings Panel.), #2 (WooCommerce Checkout Option)
The official readme.txt is a good inspiration

wcmp-razorpay-split-payment/mvx-razorpay-checkout-gateway.php 77% from 13 tests

This is the main PHP file of "MultiVendorX Razorpay Split Payment" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wcmp-razorpay-split-payment.php" instead of "mvx-razorpay-checkout-gateway.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

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
No dangerous file extensions were detected5,030 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP891,0853,1294,978
JavaScript16352

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity9.48
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces3
Interfaces5
Traits0
Classes80
▷ Abstract classes00.00%
▷ Concrete classes80100.00%
▷ Final classes00.00%
Methods329
▷ Static methods6218.84%
▷ Public methods24875.38%
▷ Protected methods7121.58%
▷ Private methods103.04%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants46
▷ Global constants36.52%
▷ Class constants4393.48%
▷ Public constants43100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/payment.png7.40KB7.69KB0.00%
images/logo.png6.57KB3.03KB▼ 53.81%