83% ccavenue-gateway-for-woocommerce

Code Review | ccAvenue gateway for WooCommerce

WordPress plugin ccAvenue gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: ccavenue-gateway-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Jun 20, 2015
  • Latest release: Dec 27, 2017
  • Number of updates: 16
  • Update frequency: every 57.6 days
  • Top authors: asachanfbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /14,031 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.07MB] [CPU: ▼5.90ms] Passed 4 tests

A check of server-side resources used by ccAvenue gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.52 ▼1.35
Dashboard /wp-admin3.37 ▲0.0745.28 ▼6.22
Posts /wp-admin/edit.php3.49 ▲0.1350.19 ▲1.11
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.01 ▼12.28
Media Library /wp-admin/upload.php3.30 ▲0.0739.10 ▼3.73

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by ccAvenue gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.091.71 ▼0.1344.52 ▲3.52
Dashboard /wp-admin2,195 ▲215.67 ▲0.1485.83 ▲0.6941.70 ▲1.55
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0235.57 ▼6.4537.15 ▼4.88
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▲0.13678.59 ▼41.7264.58 ▲4.12
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.06111.56 ▼1.0648.22 ▼0.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/ccavenue-gateway-for-woocommerce/index.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WooCommerce Checkout Setting page with selected ccAvenue.), #2 (Enter Merchant Id and Working Keys here.), #3 (Checkout Page.), #4 (Redirection Page.), #5 (Confirmation Page.)
You can take inspiration from this readme.txt

ccavenue-gateway-for-woocommerce/index.php 85% from 13 tests

The main file in "ccAvenue gateway for WooCommerce" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 171 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("ccavenue-gateway-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin403 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15920403

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
6 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png9.95KB4.39KB▼ 55.89%
screenshot-3.png15.51KB6.92KB▼ 55.42%
screenshot-2.png18.24KB9.37KB▼ 48.63%
screenshot-4.png11.58KB5.96KB▼ 48.52%
screenshot-1.png20.92KB10.97KB▼ 47.57%