89% mixpay-gateway-for-woocommerce

Code Review | MixPay Crypto Payment Gateway for WooCommerce

WordPress plugin MixPay Crypto Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: mixpay-gateway-fo...
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2022
  • Latest release: Sep 18, 2023
  • Number of updates: 30
  • Update frequency: every 13.3 days
  • Top authors: mixpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /941 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.09MB] [CPU: ▼7.85ms] Passed 4 tests

This is a short check of server-side resources used by MixPay Crypto Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.84 ▼0.21
Dashboard /wp-admin3.40 ▲0.0648.68 ▼15.91
Posts /wp-admin/edit.php3.51 ▲0.1649.40 ▼8.12
Add New Post /wp-admin/post-new.php5.98 ▲0.1097.37 ▼6.54
Media Library /wp-admin/upload.php3.32 ▲0.1038.69 ▼0.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for MixPay Crypto Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.121.69 ▲0.0540.80 ▼5.60
Dashboard /wp-admin2,195 ▲215.59 ▼0.0294.61 ▼4.6441.54 ▼3.01
Posts /wp-admin/edit.php2,100 ▲31.97 ▼0.0139.58 ▲1.9636.58 ▲1.99
Add New Post /wp-admin/post-new.php1,528 ▼023.51 ▲0.19650.75 ▲0.2259.07 ▼5.78
Media Library /wp-admin/upload.php1,403 ▲64.19 ▲0.0096.98 ▼6.0441.97 ▼2.32

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 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
Attributes that require attention:
  • Requires php: Version format is invalid
The official readme.txt might help

mixpay-gateway-for-woocommerce/class-wc-gateway-mixpay.php 85% from 13 tests

The principal PHP file in "MixPay Crypto Payment Gateway for WooCommerce" v. 1.0.10 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mixpay-gateway-for-woocommerce.php" instead of "class-wc-gateway-mixpay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin546 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1109106465
Markdown129081

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.42
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/payemt_button.png21.32KB6.81KB▼ 68.06%