84% chip-for-woocommerce

Code Review | CHIP for WooCommerce

WordPress plugin CHIP for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: chip-for-woocommerce
  • Plugin version: 1.4.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 52
  • Update frequency: every 7.3 days
  • Top authors: wanzulnet (71.15%)chipasia (30.77%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,338 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.25ms] Passed 4 tests

Analyzing server-side resources used by CHIP for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.49 ▼0.62
Dashboard /wp-admin3.31 ▲0.0146.25 ▼1.11
Posts /wp-admin/edit.php3.36 ▲0.0043.69 ▲0.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.93 ▲3.49
Media Library /wp-admin/upload.php3.23 ▲0.0032.40 ▲0.62

Server storage [IO: ▲0.36MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for CHIP for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.67 ▲0.441.72 ▼0.0043.50 ▲0.70
Dashboard /wp-admin2,198 ▲205.59 ▼0.1394.57 ▼14.1641.89 ▼2.62
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0336.15 ▲0.6136.22 ▲3.75
Add New Post /wp-admin/post-new.php1,540 ▲1425.26 ▲2.29653.22 ▼6.5249.70 ▼1.99
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0095.31 ▼0.2843.04 ▲4.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/chip-for-woocommerce/includes/class-wc-gateway-chip.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/chip-for-woocommerce/includes/blocks/class-wc-gateway-chip-blocks.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_Chip_Blocks_Support' not found in wp-content/plugins/chip-for-woocommerce/includes/blocks/clone-wc-gateway-chip-blocks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chip-for-woocommerce/includes/class-wc-queue.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/chip-for-woocommerce/includes/class-wc-migration.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_Chip' not found in wp-content/plugins/chip-for-woocommerce/includes/clone-wc-gateway-chip.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/chip-for-woocommerce/includes/class-wc-bulk-action.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chip-for-woocommerce/includes/class-wc-receipt-link.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need your attention: You can take inspiration from this readme.txt

chip-for-woocommerce/chip-for-woocommerce.php Passed 13 tests

The entry point to "CHIP for WooCommerce" version 1.4.5 is a PHP file that has certain tags in its header comment area
31 characters long description:
CHIP - Digital Finance Platform

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,344 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14588852,274
JavaScript217560
SVG10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.12
▷ Minimum class complexity1.00
▷ Maximum class complexity270.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods137
▷ Static methods75.11%
▷ Public methods11684.67%
▷ Protected methods128.76%
▷ Private methods96.57%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants13
▷ Global constants861.54%
▷ Class constants538.46%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/fpx_b2b1.png16.68KB6.20KB▼ 62.84%
assets/card.png12.22KB5.43KB▼ 55.57%
assets/card_international.png13.51KB5.53KB▼ 59.10%
assets/logo.png8.88KB4.52KB▼ 49.04%
assets/paywithchip_all.png68.19KB24.35KB▼ 64.29%