84% spectrocoin-accepting-bitcoin

Code Review | Bitcoin Payment Extension for WP WooCommerce

WordPress plugin Bitcoin Payment Extension for WP WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: spectrocoin-accep...
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2016
  • Latest release: Oct 4, 2023
  • Number of updates: 33
  • Update frequency: every 79.9 days
  • Top authors: spectrocoin (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /5,932 total downloads

Benchmarks

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

A check of server-side resources used by Bitcoin Payment Extension for WP WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.16 ▼11.25
Dashboard /wp-admin3.31 ▼0.0448.62 ▼21.94
Posts /wp-admin/edit.php3.36 ▲0.0050.25 ▼6.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.97 ▼12.62
Media Library /wp-admin/upload.php3.23 ▲0.0036.85 ▼0.03

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bitcoin Payment Extension for WP WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.091.70 ▼0.0945.65 ▲4.05
Dashboard /wp-admin2,198 ▲245.63 ▲0.0192.06 ▼3.5939.85 ▼8.41
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0243.70 ▲6.2438.31 ▲4.61
Add New Post /wp-admin/post-new.php1,551 ▲2318.62 ▼4.36643.88 ▼26.1680.75 ▲32.35
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.01100.67 ▼11.2443.28 ▼4.75

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/spectrocoin-accepting-bitcoin/spectrocoin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
8 plugin tags: spectrocoin payment gateway, woocommerce bitcoin plugin, crypto payments, altcoin support, secure payments...

spectrocoin-accepting-bitcoin/spectrocoin.php 92% from 13 tests

This is the main PHP file of "Bitcoin Payment Extension for WP WooCommerce" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("spectrocoin-accepting-bitcoin.php" instead of "spectrocoin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,102 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP10116271875
CSS1211125
Markdown252076
JSON10024
SVG2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods62
▷ Static methods23.23%
▷ Public methods5588.71%
▷ Protected methods00.00%
▷ Private methods711.29%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/spectrocoin.png2.02KB2.14KB0.00%