94% accept-bitcoin-payin-local-by-align-commerce-for-woocommerce

Code Review | Woocommerce - Accept Bitcoin and Payin Local Gateway by Align Commerce

WordPress plugin Woocommerce - Accept Bitcoin and Payin Local Gateway by Align Commerce scored 94% from 54 tests.

About plugin

  • Plugin page: accept-bitcoin-pa...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.9.2
  • First release: Oct 16, 2014
  • Latest release: Nov 26, 2014
  • Number of updates: 18
  • Update frequency: every 2.3 days
  • Top authors: aligncommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 959 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼305.06ms] Passed 4 tests

An overview of server-side resources used by Woocommerce - Accept Bitcoin and Payin Local Gateway by Align Commerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.77 ▲5.79
Dashboard /wp-admin3.41 ▲0.0135.49 ▲1.89
Posts /wp-admin/edit.php3.65 ▲0.0138.28 ▲1.68
Add New Post /wp-admin/post-new.php6.88 ▼0.0998.19 ▼1,225.15
Media Library /wp-admin/upload.php3.30 ▲0.0027.57 ▲1.35

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce - Accept Bitcoin and Payin Local Gateway by Align Commerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲2016.00 ▲0.155.74 ▼0.142.27 ▼0.15
Dashboard /wp-admin2,906 ▲526.13 ▼0.15118.43 ▼19.76157.67 ▼6.66
Posts /wp-admin/edit.php2,697 ▲123.25 ▲0.0265.80 ▼2.67146.10 ▼7.01
Add New Post /wp-admin/post-new.php1,697 ▼1421.59 ▼0.26438.45 ▼15.55160.94 ▲4.64
Media Library /wp-admin/upload.php1,709 ▲145.49 ▼0.05147.06 ▲2.99193.25 ▲6.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/accept-bitcoin-payin-local-by-align-commerce-for-woocommerce/woocommerce-aligncommerce-payment.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/accept-bitcoin-payin-local-by-align-commerce-for-woocommerce/class-wc-banktransfer-pay.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/accept-bitcoin-payin-local-by-align-commerce-for-woocommerce/woocommerce-aligncommerce-payment.php on line 12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/accept-bitcoin-payin-local-by-align-commerce-for-woocommerce/woocommerce-aligncommerce-payment.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
6 plugin tags: web payments, euro, gateway, bitcoin, payments...

accept-bitcoin-payin-local-by-align-commerce-for-woocommerce/woocommerce-aligncommerce-payment.php 92% from 13 tests

"Woocommerce - Accept Bitcoin and Payin Local Gateway by Align Commerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("accept-bitcoin-payin-local-by-align-commerce-for-woocommerce.php" instead of "woocommerce-aligncommerce-payment.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
No dangerous file extensions were detected840 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3195258840

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity30.00
▷ Minimum class complexity27.00
▷ Maximum class complexity33.00
Average method complexity5.14
▷ Minimum method complexity2.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png84.76KB35.14KB▼ 58.54%
screenshot-2.png122.81KB42.28KB▼ 65.57%
screenshot-1.png41.44KB23.29KB▼ 43.80%