84% payment-gateway-for-milacoins-on-woocommerce

Code Review | Payment Gateway through MilaCoins on WooCommerce

WordPress plugin Payment Gateway through MilaCoins on WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: payment-gateway-f...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9.2
  • WordPress version: 6.3.1
  • First release: May 2, 2022
  • Latest release: Jun 8, 2022
  • Number of updates: 14
  • Update frequency: every 4.4 days
  • Top authors: haimpi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Payment Gateway through MilaCoins on WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.34 ▲0.10
Dashboard /wp-admin3.31 ▲0.0043.62 ▼6.88
Posts /wp-admin/edit.php3.36 ▲0.0043.20 ▼5.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.50 ▼6.95
Media Library /wp-admin/upload.php3.23 ▲0.0036.18 ▲0.25

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Gateway through MilaCoins on WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.181.58 ▼0.2243.48 ▼3.19
Dashboard /wp-admin2,203 ▲125.79 ▼0.11103.23 ▼3.8738.26 ▼9.84
Posts /wp-admin/edit.php2,089 ▼32.17 ▲0.1338.65 ▲1.6135.17 ▲2.10
Add New Post /wp-admin/post-new.php1,524 ▲523.19 ▲0.07650.68 ▼37.9468.09 ▲12.04
Media Library /wp-admin/upload.php1,382 ▼94.24 ▲0.0997.08 ▼2.8239.83 ▼7.83

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payment-gateway-for-milacoins-on-woocommerce/includes/class-wc-milacoins-gateway.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/payment-gateway-for-milacoins-on-woocommerce/woocommerce-gateway-milacoins.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: gateway, payment gateway, woocommerce payments, crypto, payments

payment-gateway-for-milacoins-on-woocommerce/woocommerce-gateway-milacoins.php 85% from 13 tests

Analyzing the main PHP file in "Payment Gateway through MilaCoins on WooCommerce" version 1.0.2
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payment-gateway-for-milacoins-on-woocommerce.php" instead of "woocommerce-gateway-milacoins.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 436 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,132 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
SVG4204569
PHP23112311
JavaScript31354205
CSS16047

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.00
▷ Minimum class complexity9.00
▷ Maximum class complexity19.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin