84% accept-bitcoin

Code Review | Accept Bitcoin

WordPress plugin Accept Bitcoin scored84%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: 6.3.1
  • 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

400+ active /6,086 total downloads

Benchmarks

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

A check of server-side resources used by Accept Bitcoin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.65 ▼4.36
Dashboard /wp-admin3.31 ▲0.0054.86 ▼0.99
Posts /wp-admin/edit.php3.36 ▲0.0052.68 ▼3.66
Add New Post /wp-admin/post-new.php5.89 ▲0.00104.91 ▲1.55
Media Library /wp-admin/upload.php3.23 ▲0.0037.99 ▲0.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Accept Bitcoin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.14 ▼0.031.67 ▲0.0140.60 ▼4.00
Dashboard /wp-admin2,195 ▲185.53 ▼0.14103.26 ▲16.1250.53 ▲11.14
Posts /wp-admin/edit.php2,097 ▼61.98 ▼0.0140.12 ▼2.5834.83 ▼4.13
Add New Post /wp-admin/post-new.php1,526 ▼923.27 ▲5.22665.76 ▼43.8863.66 ▼1.15
Media Library /wp-admin/upload.php1,400 ▼34.21 ▲0.01106.39 ▲2.8345.72 ▼3.40

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accept-bitcoin/accept-bitcoin.php:313
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accept-bitcoin/templates/thankyou-content.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("bitcoin:bc1qacrp5lpw75y4z34suaxeqpzhsj742hcfpvjqff")
You can take inspiration from this readme.txt

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

The main PHP script in "Accept Bitcoin" version 0.6.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected200 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2106101200

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
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

PNG files should be compressed to save space and minimize bandwidth usage
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%