84% wc-phonepe

Code Review | Integrate PhonePe with WooCommerce

WordPress plugin Integrate PhonePe with WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-phonepe
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2021
  • Latest release: Oct 21, 2023
  • Number of updates: 31
  • Update frequency: every 27.5 days
  • Top authors: sarankumar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /8,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.98ms] Passed 4 tests

Analyzing server-side resources used by Integrate PhonePe with WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.92 ▲3.64
Dashboard /wp-admin3.38 ▲0.0452.67 ▼7.88
Posts /wp-admin/edit.php3.50 ▲0.1447.60 ▲0.67
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.52 ▼3.57
Media Library /wp-admin/upload.php3.31 ▲0.0833.56 ▼5.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Integrate PhonePe with WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9814.35 ▲0.001.84 ▲0.1643.80 ▲3.35
Dashboard /wp-admin2,198 ▲245.62 ▲0.0294.44 ▲3.7342.95 ▲0.22
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0333.58 ▼2.0634.30 ▲0.27
Add New Post /wp-admin/post-new.php1,533 ▲523.13 ▼0.06659.36 ▼20.9955.35 ▲0.99
Media Library /wp-admin/upload.php1,397 ▼34.22 ▼0.0093.38 ▼11.3142.64 ▼5.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-phonepe/includes/class-phonepe-gateway.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function phonepe\\is_admin() in wp-content/plugins/wc-phonepe/plugin-deactivation-survey/deactivate-feedback-form.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: phonepe woocommerce, phonepe, upi payment, upi, phonepe plugin

wc-phonepe/wc-phonepe.php 92% from 13 tests

Analyzing the main PHP file in "Integrate PhonePe with WooCommerce" version 1.1.5
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0" instead of "3.7")

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
No dangerous file extensions were detected983 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP11209691590
CSS39943302
JavaScript2251290
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods12.56%
▷ Public methods2358.97%
▷ Protected methods820.51%
▷ Private methods820.51%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin