10% cashfree

Code Review | Cashfree for WooCommerce

WordPress plugin Cashfree for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: cashfree
  • Plugin version: 4.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Oct 11, 2023
  • Number of updates: 60
  • Update frequency: every 32.0 days
  • Top authors: sharroh (51.67%)devcashfree (50%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active /79,281 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/cashfree/cashfree.php+75
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.17ms] Passed 4 tests

Server-side resources used by Cashfree for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.56 ▼34.75
Dashboard /wp-admin2.05 ▼1.268.00 ▼45.57
Posts /wp-admin/edit.php2.05 ▼1.316.76 ▼43.17
Add New Post /wp-admin/post-new.php2.05 ▼3.846.41 ▼93.18
Media Library /wp-admin/upload.php2.05 ▼1.186.69 ▼29.98

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

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

Browser metrics Passed 4 tests

Cashfree for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.251.64 ▼0.3238.92 ▼7.40
Dashboard /wp-admin2,195 ▲215.56 ▼0.0286.65 ▼6.4437.75 ▼1.94
Posts /wp-admin/edit.php2,097 ▼02.00 ▼0.0135.15 ▼4.7131.52 ▼4.79
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▲0.26684.57 ▼17.4457.86 ▲3.51
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0596.80 ▼8.3145.88 ▼1.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/cashfree/cashfree.php+75
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5, #6 in cashfree/assets to your readme.txt
You can look at the official readme.txt

cashfree/cashfree.php 85% from 13 tests

Analyzing the main PHP file in "Cashfree for WooCommerce" version 4.5.3
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Success! There were no dangerous files found in this plugin1,028 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13187365930
JavaScript15172
Markdown114026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.22
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes112.50%
Methods44
▷ Static methods1125.00%
▷ Public methods3784.09%
▷ Protected methods24.55%
▷ Private methods511.36%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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
PNG images were not found in this plugin