10% woo-wallee

Code Review | wallee

WordPress plugin wallee scored 10% from 54 tests.

About plugin

  • Plugin page: woo-wallee
  • Plugin version: 2.1.24
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2017
  • Latest release: Sep 26, 2023
  • Number of updates: 236
  • Update frequency: every 9.6 days
  • Top authors: customwebgmbh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active / 27,609 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/woo-wallee/includes/class-wc-wallee-migration.php+86
    Uncaught Error: Call to undefined function wc_maybe_define_constant() in wp-content/plugins/woo-wallee/includes/class-wc-wallee-migration.php:86
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): WC_Wallee_Migration::install_db()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

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

This is a short check of server-side resources used by wallee
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.68 ▼3.82
Dashboard /wp-admin3.31 ▲0.0043.60 ▼3.00
Posts /wp-admin/edit.php3.36 ▲0.0046.42 ▼0.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.21 ▼10.26
Media Library /wp-admin/upload.php3.23 ▲0.0035.73 ▼0.58

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 674 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

wallee: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.271.73 ▼0.3449.71 ▲0.25
Dashboard /wp-admin2,203 ▲185.78 ▲0.73100.37 ▼19.7937.72 ▼3.62
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0034.00 ▼3.2534.06 ▲0.38
Add New Post /wp-admin/post-new.php1,542 ▲2218.24 ▼4.83595.73 ▼71.8754.44 ▼15.21
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0393.22 ▼8.0741.54 ▼3.74

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 337× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/Transaction.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/EntityQuery.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/ShopifySubscription.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/WebAppConfirmationResponse.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/AbstractCustomerActive.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Wallee\\Sdk\\Model\\TransactionAwareEntity' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/ConnectorInvocation.php:33
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/InvoiceReimbursement.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/RenderedDocument.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Wallee\\Sdk\\Model\\AbstractAccountUpdate' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/AccountCreate.php:33
    • > PHP Fatal error
      Uncaught Error: Interface 'Wallee\\Sdk\\Model\\ModelInterface' not found in wp-content/plugins/woo-wallee/wallee-sdk/lib/Model/ShopifySubscriptionAddressCreate.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

woo-wallee/woocommerce-wallee.php 85% from 13 tests

The main PHP script in "wallee" version 2.1.24 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-wallee.php" instead of "woocommerce-wallee.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/woo-wallee/wallee-sdk/lib/ca-bundle.crt
112,976 lines of code in 657 files:
LanguageFilesBlank linesComment linesLines of code
PHP63731,561114,395109,911
JavaScript7130561,005
CSS416625758
HTML110716
PO File1143158408
Markdown258099
JSON10034
XML11020
SVG24018
YAML1007

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.14
▷ Minimum class complexity1.00
▷ Maximum class complexity198.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes628
▷ Abstract classes50.80%
▷ Concrete classes62399.20%
▷ Final classes101.61%
Methods11,474
▷ Static methods1,92016.73%
▷ Public methods11,23397.90%
▷ Protected methods1751.53%
▷ Private methods660.58%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants830
▷ Global constants101.20%
▷ Class constants82098.80%
▷ Public constants820100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.92MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/en/resource/order-capture-woocommerce.png194.65KB55.14KB▼ 71.67%
docs/en/resource/settings.png87.48KB36.58KB▼ 58.18%
docs/en/resource/order-void-woocommerce.png194.68KB55.25KB▼ 71.62%
docs/en/resource/order-refund-woocommerce.png187.64KB53.08KB▼ 71.71%
docs/en/resource/method.png67.31KB30.69KB▼ 54.40%