83% phonepe-payment-solutions

Code Review | PhonePe Payment Solutions

WordPress plugin PhonePe Payment Solutions scored83%from 54 tests.

About plugin

  • Plugin page: phonepe-payment-s...
  • Plugin version: 2.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 14, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 48
  • Update frequency: every 9.9 days
  • Top authors: phonepemerchantpgplugin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

8,000+ active /39,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.36ms] Passed 4 tests

An overview of server-side resources used by PhonePe Payment Solutions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1139.54 ▲3.94
Dashboard /wp-admin3.42 ▲0.0746.54 ▼12.58
Posts /wp-admin/edit.php3.53 ▲0.1744.01 ▼0.29
Add New Post /wp-admin/post-new.php6.00 ▲0.1178.39 ▼16.45
Media Library /wp-admin/upload.php3.34 ▲0.1134.28 ▼0.11

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for PhonePe Payment Solutions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.09 ▼0.271.75 ▼0.0143.44 ▲3.76
Dashboard /wp-admin2,198 ▲215.53 ▼0.0492.46 ▲3.9140.66 ▲2.42
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0034.33 ▼2.6532.72 ▼11.18
Add New Post /wp-admin/post-new.php1,533 ▲522.84 ▼0.28656.00 ▲56.1657.56 ▲5.10
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0694.89 ▼3.6640.63 ▼6.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_ValidationException' not found in wp-content/plugins/phonepe-payment-solutions/root-common/Exceptions/CouponValidationException.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_ValidationException' not found in wp-content/plugins/phonepe-payment-solutions/root-common/Exceptions/RedundantCallbackException.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'PPEX_PG_Interface' not found in wp-content/plugins/phonepe-payment-solutions/PPEX_WC_PG_Client.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/phonepe-payment-solutions/index.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_PhonepeException' not found in wp-content/plugins/phonepe-payment-solutions/root-common/Exceptions/ValidationException.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'PPEX_Base_Http_Client' not found in wp-content/plugins/phonepe-payment-solutions/root-common/PPEX_WC_Http_Client.php:7

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 is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

phonepe-payment-solutions/index.php 85% from 13 tests

The main PHP script in "PhonePe Payment Solutions" version 2.0.9 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("phonepe-payment-solutions.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 279 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,290 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP326085242,207
CSS11046
JavaScript32036
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.35
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods259
▷ Static methods238.88%
▷ Public methods25598.46%
▷ Protected methods00.00%
▷ Private methods41.54%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants67
▷ Global constants68.96%
▷ Class constants6191.04%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin