84% woo-addon-for-payubiz

Code Review | WooCommerce Addon for PayUbiz

WordPress plugin WooCommerce Addon for PayUbiz scored84%from 54 tests.

About plugin

  • Plugin page: woo-addon-for-pay...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Jul 20, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: wapinfosolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,239 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.81ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Addon for PayUbiz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.58 ▼2.97
Dashboard /wp-admin3.32 ▲0.0155.10 ▲0.67
Posts /wp-admin/edit.php3.37 ▲0.0149.70 ▼0.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.52 ▼8.26
Media Library /wp-admin/upload.php3.24 ▲0.0137.97 ▲0.35

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Addon for PayUbiz: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.001.77 ▼0.0541.48 ▲0.40
Dashboard /wp-admin2,206 ▲184.86 ▼0.19110.26 ▼2.5540.36 ▼4.44
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0240.72 ▲2.3537.40 ▼1.17
Add New Post /wp-admin/post-new.php1,535 ▲2123.05 ▲5.41673.70 ▲1.3157.71 ▲8.47
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.00103.45 ▼14.3447.72 ▼0.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'class-wcpz-dependencies.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-addon-for-payubiz/woo-includes/woo-functions.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-addon-for-payubiz/woocommerce-payubiz.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-addon-for-payubiz/classes/payubiz.class.php:3
    • > PHP Warning
      require_once(class-wcpz-dependencies.php): failed to open stream: No such file or directory in wp-content/plugins/woo-addon-for-payubiz/woo-includes/woo-functions.php on line 7

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: The official readme.txt is a good inspiration

woo-addon-for-payubiz/woocommerce-payubiz.php 92% from 13 tests

Analyzing the main PHP file in "WooCommerce Addon for PayUbiz" version 1.0
It is important 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-addon-for-payubiz.php" instead of "woocommerce-payubiz.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
Success! There were no dangerous files found in this plugin442 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4147161366
PO File1275576

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.00
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity2.52
▷ 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

PNG files should be compressed to save space and minimize bandwidth usage
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%