84% woo-payumoney

Code Review | WooCommerce Addon for PayUmoney

WordPress plugin WooCommerce Addon for PayUmoney scored 84% from 54 tests.

About plugin

  • Plugin page: woo-payumoney
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Jun 30, 2017
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: wapinfosolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 11,610 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.01MB] [CPU: ▼3.11ms] Passed 4 tests

A check of server-side resources used by WooCommerce Addon for PayUmoney
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.38 ▼1.50
Dashboard /wp-admin3.31 ▲0.0145.51 ▼2.49
Posts /wp-admin/edit.php3.36 ▲0.0148.48 ▲0.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.40 ▼8.87
Media Library /wp-admin/upload.php3.24 ▲0.0137.26 ▲6.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Addon for PayUmoney
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.075.37 ▲3.8642.89 ▲1.08
Dashboard /wp-admin2,206 ▲215.91 ▲0.03107.28 ▲3.3841.71 ▲1.37
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0138.84 ▼0.6233.99 ▲1.87
Add New Post /wp-admin/post-new.php1,514 ▼817.94 ▼5.14672.93 ▲71.0956.13 ▲3.76
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.00102.05 ▲3.5244.52 ▲3.70

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-payumoney/classes/payu_money.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-payumoney/woocommerce-payu.php:15

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 93% 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: The official readme.txt is a good inspiration

woo-payumoney/woocommerce-payu.php 92% from 13 tests

The main file in "WooCommerce Addon for PayUmoney" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-payumoney.php" instead of "woocommerce-payu.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
Good job! No executable or dangerous file extensions detected447 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4146161371
PO File1275576

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.50
▷ Minimum class complexity4.00
▷ Maximum class complexity31.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png3.31KB2.51KB▼ 24.01%