89% bitcoin-donation-and-fundraising-widget

Code Review | Cryptocurrency Donation Widget - Accept Bitcoin, Ethereum, and more - Bytemart.org

WordPress plugin Cryptocurrency Donation Widget - Accept Bitcoin, Ethereum, and more - Bytemart.org scored89%from 54 tests.

About plugin

  • Plugin page: bitcoin-donation-...
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Jul 16, 2020
  • Latest release: Jul 17, 2020
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: bytemart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.77ms] Passed 4 tests

Server-side resources used by Cryptocurrency Donation Widget - Accept Bitcoin, Ethereum, and more - Bytemart.org
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.20 ▼4.05
Dashboard /wp-admin3.35 ▲0.0449.36 ▼0.95
Posts /wp-admin/edit.php3.40 ▲0.0447.86 ▼3.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.53 ▼2.57
Media Library /wp-admin/upload.php3.27 ▲0.0438.16 ▼1.02

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cryptocurrency Donation Widget - Accept Bitcoin, Ethereum, and more - Bytemart.org
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.031.75 ▼0.3637.69 ▼5.74
Dashboard /wp-admin2,198 ▲185.62 ▲0.0591.96 ▼1.3843.95 ▲3.38
Posts /wp-admin/edit.php2,100 ▲32.02 ▼0.0239.53 ▲2.5337.46 ▲0.56
Add New Post /wp-admin/post-new.php1,526 ▼123.57 ▲0.41702.06 ▼11.4170.99 ▲10.55
Media Library /wp-admin/upload.php1,400 ▲34.18 ▲0.04103.54 ▼12.1945.09 ▼6.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_btcdnt
    • db_upgraded
    • theysaidso_admin_options
    • btcdnt_activation_time
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can take inspiration from this readme.txt

bitcoin-donation-and-fundraising-widget/index.php 92% from 13 tests

Analyzing the main PHP file in "Cryptocurrency Donation Widget - Accept Bitcoin, Ethereum, and more - Bytemart.org" version 0.1
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bitcoin-donation-and-fundraising-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin148 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17432148

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.65MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png78.65KB23.08KB▼ 70.65%
assets/screenshot-2.png88.33KB33.13KB▼ 62.49%
assets/screenshot-5.png107.75KB36.23KB▼ 66.38%
assets/screenshot-4.png228.63KB56.15KB▼ 75.44%
assets/icon-256x256.png9.70KB4.30KB▼ 55.61%