84% simple-bitcoin-donations-widget

Code Review | Simple Bitcoin Donations Widget

WordPress plugin Simple Bitcoin Donations Widget 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.4.2
  • WordPress version: 6.3.1
  • First release: Jul 8, 2020
  • Latest release: Jul 8, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,447 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by Simple Bitcoin Donations Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.42 ▼3.37
Dashboard /wp-admin3.31 ▲0.0146.28 ▼6.82
Posts /wp-admin/edit.php3.36 ▲0.0150.18 ▲4.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.74 ▼5.21
Media Library /wp-admin/upload.php3.24 ▲0.0133.89 ▼0.50

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_simple_btc_donate_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Simple Bitcoin Donations Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.68 ▼0.671.73 ▼0.5242.95 ▼8.90
Dashboard /wp-admin2,206 ▲155.91 ▼0.01108.46 ▼6.0338.78 ▼5.31
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0440.36 ▲1.6934.40 ▼2.90
Add New Post /wp-admin/post-new.php1,542 ▲2818.23 ▲0.55572.40 ▼145.3352.50 ▼12.07
Media Library /wp-admin/upload.php1,385 ▼34.30 ▲0.1299.10 ▼2.1941.00 ▼4.86

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_simple_btc_donate_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-bitcoin-donations-widget/simple-bitcoin-donations-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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 your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

simple-bitcoin-donations-widget/simple-bitcoin-donations-widget.php Passed 13 tests

This is the main PHP file of "Simple Bitcoin Donations Widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
This plugin adds a simple Bitcioin donation widget to your WordPress site.

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
There were no executable files found in this plugin85 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1271085

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.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%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected