10% woo-xem-gateway-luxtag-fork

Code Review | Woocommerce Gateway XEM (Luxtag Fork)

WordPress plugin Woocommerce Gateway XEM (Luxtag Fork) scored10%from 54 tests.

About plugin

  • Plugin page: woo-xem-gateway-l...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2019
  • Latest release: Jul 22, 2019
  • Number of updates: 9
  • Update frequency: every 1.2 days
  • Top authors: wildanluxtag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /500 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class '\WSB\Activator' not found

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.76ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Gateway XEM (Luxtag Fork)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.75 ▼7.89
Dashboard /wp-admin3.34 ▲0.0452.10 ▼0.67
Posts /wp-admin/edit.php3.46 ▲0.1045.48 ▼0.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.28 ▼17.66
Media Library /wp-admin/upload.php3.27 ▲0.0440.69 ▼0.69

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Gateway XEM (Luxtag Fork)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4214.72 ▲0.371.83 ▼0.0240.14 ▼3.21
Dashboard /wp-admin2,198 ▲215.64 ▲0.0187.74 ▼8.6641.11 ▼6.83
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0236.46 ▲1.3533.20 ▼0.29
Add New Post /wp-admin/post-new.php1,529 ▲323.18 ▼0.20682.07 ▼15.0959.17 ▲8.15
Media Library /wp-admin/upload.php1,403 ▲64.17 ▲0.02100.22 ▼24.7447.38 ▼1.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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)
Good news, no errors were detected

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-xem-gateway-luxtag-fork/includes/class-xem-ajax.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-xem-gateway-luxtag-fork/includes/class-wc-gateway-xem.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (The payment method show to customer under checkout.) image not found
You can take inspiration from this readme.txt

woo-xem-gateway-luxtag-fork/woocommerce-gateway-xem.php 85% from 13 tests

This is the main PHP file of "Woocommerce Gateway XEM (Luxtag Fork)" version 2.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-xem-gateway-luxtag-fork.php" instead of "woocommerce-gateway-xem.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,981 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP6183233750
JavaScript8112186670
PO File4168168450
Sass16054
CSS212438
Bourne Shell15019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.40
▷ Minimum class complexity10.00
▷ Maximum class complexity35.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods2142.86%
▷ Public methods3979.59%
▷ Protected methods12.04%
▷ Private methods918.37%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/pay_with_xem.png18.76KB8.97KB▼ 52.19%
assets/img/copy.png0.42KB0.34KB▼ 19.59%