84% bitcoin-calculator-widget

Code Review | Bitcoin Calculator Widget

WordPress plugin Bitcoin Calculator Widget scored84%from 54 tests.

About plugin

  • Plugin page: bitcoin-calculato...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 1, 2014
  • Latest release: Mar 3, 2014
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: globalreachllc (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /4,854 total downloads


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.03MB] [CPU: ▼6.08ms] Passed 4 tests

Server-side resources used by Bitcoin Calculator Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.77 ▼3.36
Dashboard /wp-admin3.33 ▲0.0344.96 ▼3.10
Posts /wp-admin/edit.php3.38 ▲0.0346.14 ▼4.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.34 ▼13.38
Media Library /wp-admin/upload.php3.26 ▲0.0335.42 ▲0.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Bitcoin Calculator Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.19 ▼1.182.01 ▲0.2444.40 ▲2.29
Dashboard /wp-admin2,206 ▲185.91 ▲1.04103.58 ▲1.7137.57 ▼2.56
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0840.47 ▼1.2433.97 ▼3.97
Add New Post /wp-admin/post-new.php1,537 ▼523.15 ▲5.02652.67 ▲46.0750.26 ▲1.70
Media Library /wp-admin/upload.php1,391 ▼04.27 ▲0.1094.52 ▼3.5343.27 ▼1.04

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_btc_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bitcoin-calculator-widget/bitcoin-conversions.php:14

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


Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (This is an example of the widget w/ default settings in the standard Twenty Fourteen theme.) image required
The official readme.txt might help

bitcoin-calculator-widget/bitcoin-conversions.php 92% from 13 tests

This is the main PHP file of "Bitcoin Calculator Widget" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bitcoin-calculator-widget.php" instead of "bitcoin-conversions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected127 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions1100.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bitcoin-calc.png2.04KB1.59KB▼ 22.06%