83% woocommerce-khipu

Code Review | WooCommerce khipu

WordPress plugin WooCommerce khipu scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-khipu
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 13, 2013
  • Latest release: Dec 27, 2022
  • Number of updates: 64
  • Update frequency: every 54.0 days
  • Top authors: khipu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /8,166 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.00MB] [CPU: ▼2.42ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce khipu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.09 ▼3.37
Dashboard /wp-admin3.31 ▲0.0052.03 ▼0.16
Posts /wp-admin/edit.php3.36 ▲0.0049.72 ▼2.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.29 ▼3.52
Media Library /wp-admin/upload.php3.23 ▲0.0037.95 ▲2.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce khipu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.72 ▲0.441.76 ▼0.1644.84 ▼3.05
Dashboard /wp-admin2,199 ▲255.66 ▼0.0186.18 ▼12.2641.52 ▼2.58
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0339.76 ▼1.7138.69 ▲2.92
Add New Post /wp-admin/post-new.php1,540 ▲518.29 ▲0.28669.57 ▲45.6465.76 ▲0.08
Media Library /wp-admin/upload.php1,407 ▲104.23 ▲0.0599.30 ▼3.0247.43 ▲2.92

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_khipu_abstract' not found in wp-content/plugins/woocommerce-khipu/includes/class-wc-gateway-khipu-regular-transfer.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_khipu_abstract' not found in wp-content/plugins/woocommerce-khipu/includes/class-wc-gateway-khipu-simplified-transfer.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-khipu/includes/abstract-wc-gateway-khipu.php:3

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Add images for these screenshots: #1 (https://s3.amazonaws.com/static.khipu.com/woocommerce/activate-plugin.png), #2 (https://s3.amazonaws.com/static.khipu.com/woocommerce/khipu-settings.png), #3 (https://s3.amazonaws.com/static.khipu.com/id-cobrador.png)
The official readme.txt might help

woocommerce-khipu/woocommerce-gateway-khipu.php 92% from 13 tests

"WooCommerce khipu" version 3.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-khipu.php" instead of "woocommerce-gateway-khipu.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
Good job! No executable or dangerous file extensions detected4,120 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,1723,1883,985
JSON30092
Markdown212043

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.08
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods337
▷ Static methods82.37%
▷ Public methods33499.11%
▷ Protected methods00.00%
▷ Private methods30.89%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.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
No PNG images were found in this plugin