68% plisio-payment-gateway-for-woocommerce

Code Review | Accept Cryptocurrencies with Plisio

WordPress plugin Accept Cryptocurrencies with Plisio scored68%from 54 tests.

About plugin

  • Plugin page: plisio-payment-ga...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 27, 2020
  • Latest release: Dec 6, 2022
  • Number of updates: 64
  • Update frequency: every 16.4 days
  • Top authors: plisio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /3,325 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼1.77ms] Passed 4 tests

This is a short check of server-side resources used by Accept Cryptocurrencies with Plisio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.07 ▼3.53
Dashboard /wp-admin3.31 ▲0.0148.31 ▼5.47
Posts /wp-admin/edit.php3.37 ▲0.0147.49 ▲0.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.53 ▲2.13
Media Library /wp-admin/upload.php3.24 ▲0.0137.48 ▲1.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_plisio_order
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Accept Cryptocurrencies with Plisio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.56 ▼1.072.21 ▲0.5144.78 ▼1.55
Dashboard /wp-admin2,206 ▲154.82 ▼1.08103.65 ▼11.1341.38 ▼7.00
Posts /wp-admin/edit.php2,086 ▼72.01 ▲0.0233.54 ▼3.9337.60 ▲3.84
Add New Post /wp-admin/post-new.php1,533 ▼023.26 ▼0.02669.76 ▼15.3753.22 ▼5.66
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.01101.57 ▼1.7642.73 ▼0.82

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

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

Smoke tests 50% 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 0% from 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/plisio-payment-gateway-for-woocommerce/templates/invoice.php
    • > /wp-content/plugins/plisio-payment-gateway-for-woocommerce/templates/admin_statuses_row.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/plisio-payment-gateway-for-woocommerce/templates/admin_statuses_row.php on line 6
    • > PHP Notice
      Undefined variable: plisio_invoice_id in wp-content/plugins/plisio-payment-gateway-for-woocommerce/templates/invoice.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plisio-payment-gateway-for-woocommerce/plisio.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/plisio-payment-gateway-for-woocommerce/includes/wc_plisio_gateway.php:4
    • > PHP Notice
      Undefined variable: plisioStatuses in wp-content/plugins/plisio-payment-gateway-for-woocommerce/templates/admin_statuses_row.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: You can look at the official readme.txt

plisio-payment-gateway-for-woocommerce/plisio.php 92% from 13 tests

The principal PHP file in "Accept Cryptocurrencies with Plisio" v. 1.0.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("plisio-payment-gateway-for-woocommerce.php" instead of "plisio.php")

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
Success! There were no dangerous files found in this plugin595 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP78725557
Markdown133038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.67
▷ Minimum class complexity10.00
▷ Maximum class complexity39.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods2266.67%
▷ Protected methods39.09%
▷ Private methods824.24%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/plisio.png3.81KB1.52KB▼ 60.23%