84% simple-bitcoin-donations-for-woocommerce

Code Review | Simple Bitcoin donations for WooCommerce

WordPress plugin Simple Bitcoin donations for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: simple-bitcoin-do...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Jul 6, 2020
  • Latest release: Sep 9, 2021
  • Number of updates: 6
  • Update frequency: every 71.7 days
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.39ms] Passed 4 tests

Analyzing server-side resources used by Simple Bitcoin donations for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.06 ▲0.99
Dashboard /wp-admin3.31 ▲0.0153.79 ▼0.93
Posts /wp-admin/edit.php3.36 ▲0.0150.83 ▼4.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.31 ▼8.97
Media Library /wp-admin/upload.php3.24 ▲0.0137.03 ▲4.55

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Bitcoin donations for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.16 ▼0.144.99 ▲3.1445.68 ▲0.43
Dashboard /wp-admin2,206 ▼04.87 ▼0.09110.65 ▼0.8640.65 ▼13.68
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0137.37 ▼3.2935.38 ▲1.03
Add New Post /wp-admin/post-new.php1,521 ▼2123.22 ▲4.96647.57 ▲9.7665.47 ▲2.58
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.0597.37 ▼7.7939.41 ▼5.81

Uninstaller [IO: ✅] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-bitcoin-donations-for-woocommerce/simple-bitcoin-donations-for-woocommerce.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

simple-bitcoin-donations-for-woocommerce/simple-bitcoin-donations-for-woocommerce.php Passed 13 tests

The principal PHP file in "Simple Bitcoin donations for WooCommerce" v. 1.0 is loaded by WordPress automatically on each request
86 characters long description:
This plugin lets you add a Bitcoin donations option to your WooCommerce checkout page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13510107

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin