84% phonepe-checkout-solutions

Code Review | PhonePe Express Checkout

WordPress plugin PhonePe Express Checkout scored84%from 54 tests.

About plugin

  • Plugin page: phonepe-checkout-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.2.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Jan 25, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: phonepemerchantpgplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /589 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.45MB] [CPU: ▲1.83ms] Passed 4 tests

An overview of server-side resources used by PhonePe Express Checkout
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4848.25 ▲12.14
Dashboard /wp-admin3.79 ▲0.4847.49 ▲2.74
Posts /wp-admin/edit.php3.84 ▲0.4847.86 ▲1.23
Add New Post /wp-admin/post-new.php6.33 ▲0.44101.01 ▲1.60
Media Library /wp-admin/upload.php3.65 ▲0.4236.52 ▲1.73

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for PhonePe Express Checkout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.201.96 ▲0.4241.06 ▲1.16
Dashboard /wp-admin2,206 ▲184.83 ▼1.03101.87 ▲2.5439.44 ▼5.71
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0636.72 ▲1.4636.73 ▲0.83
Add New Post /wp-admin/post-new.php1,533 ▲1923.13 ▲5.63660.62 ▼9.8357.93 ▲2.58
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0394.85 ▲0.3441.91 ▲1.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 50% from 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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_PhonepePluginEvent' not found in wp-content/plugins/phonepe-checkout-solutions/includes/api/PPEC_WC_Event.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/phonepe-checkout-solutions/includes/api/api.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_PhonepeException' not found in wp-content/plugins/phonepe-checkout-solutions/includes/common/Exceptions/ValidationException.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/phonepe-checkout-solutions/templates/processing.php:85
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_ValidationException' not found in wp-content/plugins/phonepe-checkout-solutions/includes/common/Exceptions/CouponValidationException.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/phonepe-checkout-solutions/includes/api/api.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PPEC_ValidationException' not found in wp-content/plugins/phonepe-checkout-solutions/includes/common/Exceptions/RedundantCallbackException.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: woocommerce, phonepe, e-commerce, express, ecommerce...

phonepe-checkout-solutions/woo-phonepeExpressbuy.php 92% from 13 tests

"PhonePe Express Checkout" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("phonepe-checkout-solutions.php" instead of "woo-phonepeExpressbuy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin11,841 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1036739,531
PHP204553032,250
JSON30042
Markdown14018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods68
▷ Static methods1725.00%
▷ Public methods6494.12%
▷ Protected methods00.00%
▷ Private methods45.88%
Functions60
▷ Named functions5896.67%
▷ Anonymous functions23.33%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin