10% bittipit-bitcoin-donation-button

Code Review | Bittip.It - Bitcoin Donation Button

WordPress plugin Bittip.It - Bitcoin Donation Button scored 10% from 53 tests.

About plugin

  • Plugin page: bittipit-bitcoin-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.8.1
  • First release: Dec 3, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: bpj50 (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

10+ active / 2,000 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/bittipit-bitcoin-donation-button/bittip_it.php+253
    Use of undefined constant add_after_content - assumed 'add_after_content' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.84MB] [CPU: ▼301.99ms] Passed 4 tests

Analyzing server-side resources used by Bittip.It - Bitcoin Donation Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼1.045.19 ▼26.81
Dashboard /wp-admin1.81 ▼1.245.24 ▼33.22
Posts /wp-admin/edit.php1.81 ▼1.304.79 ▼38.30
Add New Post /wp-admin/post-new.php1.81 ▼3.624.82 ▼1,107.81
Media Library /wp-admin/upload.php1.81 ▼1.206.91 ▼28.64
Bittip.It Options /wp-admin/options-general.php?page=bittipit_options1.815.21

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Bittip.It - Bitcoin Donation Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7216.03 ▲0.388.66 ▲1.0548.27 ▲0.99
Dashboard /wp-admin2,938 ▲885.90 ▲0.06138.78 ▼9.3198.36 ▼6.92
Posts /wp-admin/edit.php2,711 ▲52.69 ▼0.0063.51 ▼3.4181.65 ▼6.30
Add New Post /wp-admin/post-new.php1,659 ▲613.86 ▼4.81374.68 ▼17.11112.16 ▲6.89
Media Library /wp-admin/upload.php1,780 ▲85.00 ▼0.03161.28 ▲8.02115.60 ▼0.38
Bittip.It Options /wp-admin/options-general.php?page=bittipit_options1,3603.7671.0969.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/bittipit-bitcoin-donation-button/bittip_it.php+253
    Use of undefined constant add_after_content - assumed 'add_after_content' (this will throw an Error in a future version of PHP)

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bittipit_options
    • > Warning in wp-content/plugins/bittipit-bitcoin-donation-button/bittip_it.php+253
    Use of undefined constant add_after_content - assumed 'add_after_content' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bittipit_options
    • > Notice in wp-content/plugins/bittipit-bitcoin-donation-button/bittip_it.php+115
    Trying to access array offset on value of type bool

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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bittipit-bitcoin-donation-button/bittip_it.php:36

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=bittipit_options
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=bittipit_options 194:393 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: bitcoin, flickr, donate

bittipit-bitcoin-donation-button/bittip_it.php 92% from 13 tests

The main PHP script in "Bittip.It - Bitcoin Donation Button" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bittipit-bitcoin-donation-button.php" instead of "bittip_it.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin137 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17938137

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin