10% payex-woocommerce-checkout

Code Review | PayEx WooCommerce Checkout

WordPress plugin PayEx WooCommerce Checkout scored10%from 54 tests.

About plugin

  • Plugin page: payex-woocommerce...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Jul 30, 2019
  • Number of updates: 5
  • Update frequency: every 5.4 days
  • Top authors: payex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /628 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+386
    rmdir(/tmp/psp_65291ba4aa0d4): Directory not empty

Server metrics [RAM: ▼1.66MB] [CPU: ▼56.79ms] Passed 4 tests

Server-side resources used by PayEx WooCommerce Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.136.81 ▼35.93
Dashboard /wp-admin2.35 ▼0.9910.00 ▼56.16
Posts /wp-admin/edit.php2.36 ▼1.008.53 ▼42.42
Add New Post /wp-admin/post-new.php2.35 ▼3.537.23 ▼92.65
Media Library /wp-admin/upload.php2.36 ▼0.878.29 ▼31.23

Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • There were 162 files (725.95KB) illegally modified outside of "wp-content/plugins/payex-woocommerce-checkout/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/payex-woocommerce-payments/assets/images/payex.gif
    • (new file) wp-content/plugins/payex-woocommerce-payments/includes/class-wc-background-payex-queue.php
    • (new file) wp-content/plugins/payex-woocommerce-payments/assets/images/creditcards.png
    • (new file) wp-content/plugins/payex-woocommerce-payments/changelog.txt
    • (new file) wp-content/plugins/payex-woocommerce-payments/includes/abstracts/abstract-wc-payment-gateway-payex.php
    • (new file) wp-content/plugins/payex-woocommerce-payments/assets/js/admin.js
    • (new file) wp-content/plugins/payex-woocommerce-payments/assets/images/swish.png
    • (new file) wp-content/plugins/payex-woocommerce-payments/.travis.yml
    • (new file) wp-content/plugins/payex-woocommerce-payments/assets/images/invoice.png
    • (new file) wp-content/plugins/payex-woocommerce-payments/assets/images/vipps.png
    • ...
Filesystem: 34 new files
Database: 1 new table, 8 new options
New tables
wp_payex_transactions
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
recovery_mode_email_last_sent
widget_theysaidso_widget
woocommerce_payex_psp_version
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

PayEx WooCommerce Checkout: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.74 ▲0.091.80 ▼0.0344.18 ▲3.41
Dashboard /wp-admin2,233 ▲304.87 ▼1.01116.09 ▲7.2944.01 ▼0.77
Posts /wp-admin/edit.php2,114 ▲112.02 ▲0.0436.71 ▼7.2732.20 ▼3.70
Add New Post /wp-admin/post-new.php45 ▼1,4810.44 ▼17.080.06 ▼658.4210.38 ▼42.94
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.0198.82 ▲3.0261.06 ▲18.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/payex-woocommerce-payments/vendors/php-name-parser/vendor/aait/php-name-parser/parser.php+437
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_payex_transactions
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • woocommerce_payex_psp_version
    • db_upgraded

Smoke tests 50% 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 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/payex-woocommerce-checkout/tests/bootstrap.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Unit_Test_Case' not found in wp-content/plugins/payex-woocommerce-checkout/tests/unit-tests/wc-gateway-payex-checkout.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: You can look at the official readme.txt

payex-woocommerce-checkout/payex-woocommerce-checkout.php 85% from 13 tests

"PayEx WooCommerce Checkout" version 2.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin2,231 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP92813601,033
JavaScript3128158863
CSS43341134
PO File1559070
Markdown229051
YAML18449
XML11019
JSON10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity43.67
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods48
▷ Static methods510.42%
▷ Public methods4695.83%
▷ Protected methods24.17%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
7 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/image4.png8.35KB5.43KB▼ 34.90%
docs/image3.png47.82KB15.66KB▼ 67.26%
docs/image2.png9.45KB4.37KB▼ 53.71%
docs/image5.png17.30KB6.96KB▼ 59.77%
docs/image1.png7.68KB3.67KB▼ 52.17%