94% accept-bitcoin

Code Review | Accept Bitcoin

WordPress plugin Accept Bitcoin scored 94% from 54 tests.

About plugin

  • Plugin page: accept-bitcoin
  • Plugin version: 0.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 5.9.2
  • First release: Jan 5, 2021
  • Latest release: Jan 5, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: bitonymous (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,118 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Accept Bitcoin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0151.93 ▲1.03
Dashboard /wp-admin3.41 ▲0.0032.65 ▲0.48
Posts /wp-admin/edit.php3.64 ▲0.0034.43 ▼1.86
Add New Post /wp-admin/post-new.php6.88 ▼0.0990.65 ▼1,157.52
Media Library /wp-admin/upload.php3.29 ▲0.0023.79 ▼1.34

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Accept Bitcoin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.94 ▲0.306.21 ▼0.442.80 ▲0.27
Dashboard /wp-admin2,892 ▲346.12 ▼0.17117.01 ▼24.62160.25 ▼3.50
Posts /wp-admin/edit.php2,694 ▲63.24 ▲0.0163.27 ▲0.06141.04 ▼3.81
Add New Post /wp-admin/post-new.php1,668 ▼10517.83 ▼3.28413.43 ▼52.34154.50 ▼2.10
Media Library /wp-admin/upload.php1,698 ▼05.48 ▼0.01139.71 ▼4.88193.84 ▲5.11

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 successfully, without leaving any zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accept-bitcoin/templates/thankyou-content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accept-bitcoin/accept-bitcoin.php:313

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

accept-bitcoin/accept-bitcoin.php 92% from 13 tests

The principal PHP file in "Accept Bitcoin" v. 0.6.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin200 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2106101200

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
img/bitcoin-symbol.png1.31KB1.21KB▼ 8.18%