89% bitcoin-payments-by-chainside-net-for-woocommerce

Code Review | Chainside Bitcoin Payments

WordPress plugin Chainside Bitcoin Payments scored89%from 54 tests.

About plugin

  • Plugin page: bitcoin-payments-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: Feb 24, 2020
  • Number of updates: 5
  • Update frequency: every 5.4 days
  • Top authors: chainside (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,434 total downloads

Benchmarks

Plugin footprint 83% from 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.15MB] [CPU: ▲5.63ms] Passed 4 tests

A check of server-side resources used by Chainside Bitcoin Payments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1648.28 ▲4.42
Dashboard /wp-admin3.45 ▲0.1454.08 ▲3.27
Posts /wp-admin/edit.php3.55 ▲0.1957.49 ▲10.96
Add New Post /wp-admin/post-new.php6.03 ▲0.14105.87 ▲6.69
Media Library /wp-admin/upload.php3.37 ▲0.1443.12 ▲8.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chainside Bitcoin Payments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▼0.161.99 ▲0.0941.21 ▲0.55
Dashboard /wp-admin2,209 ▲185.85 ▲0.97107.21 ▲6.1243.35 ▲0.16
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0539.77 ▲3.9036.38 ▲2.96
Add New Post /wp-admin/post-new.php1,546 ▲3223.37 ▲5.88684.66 ▲16.2464.90 ▲11.63
Media Library /wp-admin/upload.php1,385 ▼34.26 ▼0.0497.99 ▲2.7940.54 ▼2.00

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • License: No value
  • License uri: Please fix this invalid URI: ""
The official readme.txt might help

bitcoin-payments-by-chainside-net-for-woocommerce/class-wc-gateway-chainside.php 92% from 13 tests

The main PHP script in "Chainside Bitcoin Payments" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bitcoin-payments-by-chainside-net-for-woocommerce.php" instead of "class-wc-gateway-chainside.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin635 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19783540
PO File1343595

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.00
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods515.15%
▷ Public methods2060.61%
▷ Protected methods1133.33%
▷ Private methods26.06%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/32_bitcoin@1x.png5.46KB2.95KB▼ 45.94%