89% rzp-woocommerce

Code Review | Razorpay Payment Links for WooCommerce

WordPress plugin Razorpay Payment Links for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: rzp-woocommerce
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.4-6.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2020
  • Latest release: Jul 22, 2023
  • Number of updates: 39
  • Update frequency: every 32.7 days
  • Top authors: infosatech (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /20,660 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.56ms] Passed 4 tests

A check of server-side resources used by Razorpay Payment Links for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.26 ▼0.10
Dashboard /wp-admin3.32 ▲0.0242.67 ▼2.66
Posts /wp-admin/edit.php3.37 ▲0.0247.22 ▲0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.71 ▲0.26
Media Library /wp-admin/upload.php3.24 ▲0.0237.72 ▲3.28

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
rzpwc_plugin_installed_time

Browser metrics Passed 4 tests

Razorpay Payment Links for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.15 ▼1.591.74 ▼0.4343.05 ▼2.76
Dashboard /wp-admin2,206 ▲184.87 ▼0.05107.19 ▼3.9038.74 ▼1.21
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0737.62 ▼3.4434.90 ▲0.62
Add New Post /wp-admin/post-new.php1,536 ▲323.49 ▲0.51673.59 ▲72.6462.89 ▲14.04
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.05106.04 ▲8.7443.75 ▲0.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: razorpay, credit card, qrcode, debit card, woocommerce...

rzp-woocommerce/rzp-woocommerce.php 85% from 13 tests

This is the main PHP file of "Razorpay Payment Links for WooCommerce" version 1.1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "2.4")
  • Description: Keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected870 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3211390870

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity63.00
▷ Minimum class complexity28.00
▷ Maximum class complexity98.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods39
▷ Static methods25.13%
▷ Public methods2666.67%
▷ Protected methods00.00%
▷ Private methods1333.33%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/logo.png2.63KB1.93KB▼ 26.55%