89% ccavanue-woocommerce-payment-getway

Code Review | CCAvenue Payment Gateway for WooCommerce

WordPress plugin CCAvenue Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: ccavanue-woocomme...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.1.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2015
  • Latest release: Mar 21, 2023
  • Number of updates: 40
  • Update frequency: every 70.5 days
  • Top authors: nilesh0308 (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

6,000+ active /76,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by CCAvenue Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.66 ▼1.45
Dashboard /wp-admin3.31 ▲0.0146.98 ▲1.43
Posts /wp-admin/edit.php3.36 ▲0.0052.38 ▲8.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.63 ▼7.51
Media Library /wp-admin/upload.php3.23 ▲0.0034.56 ▲1.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for CCAvenue Payment Gateway for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.211.62 ▼0.7141.09 ▼3.11
Dashboard /wp-admin2,206 ▲155.79 ▲0.9095.81 ▼11.9439.03 ▼4.74
Posts /wp-admin/edit.php2,086 ▼61.99 ▼0.0137.70 ▲1.2632.10 ▼3.72
Add New Post /wp-admin/post-new.php1,519 ▼1023.15 ▼0.22657.89 ▼23.9656.84 ▲3.85
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0495.04 ▼6.6441.60 ▼1.06

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === ccavanue-woocommerce-payment-getway === )
  • Screenshots: Please add images for these screenshots: #1 (WooCommerce payment gateway setting page), #2 (CCAvenue setting page), #3 (CCAvenue Payment gateway option at the checkout page)
  • Donate link: Please fix this invalid URI: "'http://jeetudyog.com/donation.php'"
Please take inspiration from this readme.txt

ccavanue-woocommerce-payment-getway/index.php 92% from 13 tests

This is the main PHP file of "CCAvenue Payment Gateway for WooCommerce" version 3.1, 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("ccavanue-woocommerce-payment-getway.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected460 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16863460

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png84.39KB27.59KB▼ 67.31%
images/logo.png15.20KB3.58KB▼ 76.41%
screenshot-2.png86.29KB29.09KB▼ 66.28%
screenshot-3.png40.63KB15.74KB▼ 61.25%