94% sovereign-crypto-payments

Code Review | Sovereign Crypto Payments

WordPress plugin Sovereign Crypto Payments scored 94% from 54 tests.

About plugin

  • Plugin page: sovereign-crypto-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 5.9.2
  • First release: Apr 21, 2020
  • Latest release: Mar 5, 2021
  • Number of updates: 8
  • Update frequency: every 39.8 days
  • Top authors: onionbazaar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,689 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Sovereign Crypto Payments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0459.17 ▲4.76
Dashboard /wp-admin3.45 ▲0.0585.10 ▲50.90
Posts /wp-admin/edit.php3.68 ▲0.0439.18 ▲2.88
Add New Post /wp-admin/post-new.php6.91 ▼0.0594.73 ▼1,195.16
Media Library /wp-admin/upload.php3.33 ▲0.0424.78 ▼17.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 35 new files
Database: 3 new tables, no new options
New tables
wp_obzsscp_carousel
wp_obzsscp_electrum_addresses
wp_obzsscp_payments

Browser metrics Passed 4 tests

An overview of browser requirements for Sovereign Crypto Payments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2715.96 ▼0.025.69 ▼0.122.72 ▼0.20
Dashboard /wp-admin2,878 ▲276.12 ▼0.09119.86 ▼18.17158.64 ▼41.87
Posts /wp-admin/edit.php2,672 ▼163.24 ▲0.0070.61 ▲5.79185.21 ▲41.28
Add New Post /wp-admin/post-new.php1,661 ▼9116.95 ▼3.93433.27 ▼36.90159.88 ▼1.29
Media Library /wp-admin/upload.php1,701 ▲35.52 ▲0.05148.83 ▼1.80188.73 ▲0.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/sovereign-crypto-payments/src/OBZSSCP_Gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sovereign-crypto-payments/sovereign-crypto-payments.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

sovereign-crypto-payments/sovereign-crypto-payments.php Passed 13 tests

The main PHP script in "Sovereign Crypto Payments" version 1.0.4 is automatically included on every request by WordPress
47 characters long description:
Cryptocurrency Payment Gateway for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,645 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP251,4261,1447,332
JavaScript14514290
CSS14023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity34.42
▷ Minimum class complexity1.00
▷ Maximum class complexity233.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods372
▷ Static methods20555.11%
▷ Public methods33590.05%
▷ Protected methods00.00%
▷ Private methods379.95%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants51
▷ Global constants4078.43%
▷ Class constants1121.57%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.31MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshots/screenshot-1.png80.57KB31.35KB▼ 61.09%
assets/screenshots/screenshot-2.png88.10KB33.76KB▼ 61.68%
assets/screenshots/screenshot-5.png5.70KB2.91KB▼ 48.96%
assets/img/bitcoin_logo_small.png1.01KB0.84KB▼ 16.96%
assets/screenshots/screenshot-6.png44.08KB18.16KB▼ 58.81%