84% woocommerce-payu-india-payment-gateway

Code Review | WooCommerce PayU India Payment Gateway

WordPress plugin WooCommerce PayU India Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-payu-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 3, 2015
  • Latest release: Jun 14, 2015
  • Number of updates: 5
  • Update frequency: every 154.4 days
  • Top authors: Omikant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.38ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce PayU India Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.94 ▲4.89
Dashboard /wp-admin3.36 ▲0.0546.03 ▼0.49
Posts /wp-admin/edit.php3.41 ▲0.0552.35 ▲5.79
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.76 ▼2.91
Media Library /wp-admin/upload.php3.28 ▲0.0534.56 ▲0.05

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

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

Browser metrics Passed 4 tests

WooCommerce PayU India Payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.061.76 ▲0.1643.12 ▲2.02
Dashboard /wp-admin2,209 ▲185.86 ▼0.04100.06 ▼1.8236.28 ▼14.05
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0439.35 ▲3.0034.29 ▲1.06
Add New Post /wp-admin/post-new.php1,533 ▲1423.14 ▼0.15643.35 ▼9.3651.92 ▲2.39
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0595.75 ▼5.0641.17 ▲1.16

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-payu-india-payment-gateway/payu-india-payment-gateway-woocommerce.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Admin list interface.), #2 (Example output.(see documentation).)
You can take inspiration from this readme.txt

woocommerce-payu-india-payment-gateway/payu-india-payment-gateway-woocommerce.php 92% from 13 tests

The principal PHP file in "WooCommerce PayU India Payment Gateway" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-payu-india-payment-gateway.php" instead of "payu-india-payment-gateway-woocommerce.php")

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 detected231 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13036231

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.17MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png118.19KB36.35KB▼ 69.24%
screenshot-2.png55.32KB14.08KB▼ 74.55%