73% bharatx-pay-in-3

Code Review | BharatX Pay In 3

WordPress plugin BharatX Pay In 3 scored73%from 54 tests.

About plugin

  • Plugin page: bharatx-pay-in-3
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.9
  • WordPress version: 6.3.1
  • First release: Feb 22, 2022
  • Latest release: Sep 18, 2023
  • Number of updates: 24
  • Update frequency: every 24.3 days
  • Top authors: bharatx (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,268 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.25ms] Passed 4 tests

Analyzing server-side resources used by BharatX Pay In 3
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.05 ▼1.65
Dashboard /wp-admin3.36 ▲0.0145.11 ▼15.38
Posts /wp-admin/edit.php3.47 ▲0.1149.02 ▲0.52
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.20 ▼10.31
Media Library /wp-admin/upload.php3.28 ▲0.0535.20 ▼1.66

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: 1 new table, 6 new options
New tables
wp_bharatx_pay_in_3_transactions
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

BharatX Pay In 3: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.23 ▼0.321.61 ▼0.1943.29 ▲0.42
Dashboard /wp-admin2,198 ▲185.56 ▼0.0980.72 ▼3.5140.54 ▲0.46
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0540.72 ▲3.4039.45 ▲4.14
Add New Post /wp-admin/post-new.php1,532 ▲623.26 ▼0.22659.22 ▼25.8857.53 ▼4.87
Media Library /wp-admin/upload.php1,406 ▲64.19 ▼0.0495.61 ▼19.0742.97 ▼6.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_bharatx_pay_in_3_transactions
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× 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/bharatx-pay-in-3/admin/class-bharatx-pay-in-3-feature-plugin-gateway.php:21

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === bharatx-pay-in-3 === )
The official readme.txt might help

bharatx-pay-in-3/bharatx-pay-in-3-feature-plugin.php 85% from 13 tests

The main PHP file in "BharatX Pay In 3" ver. 1.6.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("bharatx-pay-in-3.php" instead of "bharatx-pay-in-3-feature-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,839 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112937271,042
JavaScript266113518
CSS14436236
SVG21043

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.10
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods69
▷ Static methods710.14%
▷ Public methods6086.96%
▷ Protected methods00.00%
▷ Private methods913.04%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/popup.png81.60KB24.40KB▼ 70.09%
public/images/logo.png1.87KB1.39KB▼ 25.65%