78% what-if-bitcoin

Code Review | What If Bitcoin?

WordPress plugin What If Bitcoin? scored78%from 54 tests.

About plugin

  • Plugin page: what-if-bitcoin
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2018
  • Latest release: Sep 5, 2023
  • Number of updates: 4
  • Update frequency: every 158.7 days
  • Top authors: techuptodate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /5,969 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.02MB] [CPU: ▼6.50ms] Passed 4 tests

An overview of server-side resources used by What If Bitcoin?
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.85 ▼0.68
Dashboard /wp-admin3.32 ▲0.0247.82 ▼5.60
Posts /wp-admin/edit.php3.37 ▲0.0148.84 ▼0.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.22 ▼15.87
Media Library /wp-admin/upload.php3.24 ▲0.0135.45 ▼3.84

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 20 new options
New WordPress options
whatif_made_love
widget_recent-posts
whatif_result_text_color
widget_theysaidso_widget
whatif_input_bg_color
whatif_input_text_color
whatif_bg_color
widget_recent-comments
whatif_text_color
whatif_result_border_color
...

Browser metrics Passed 4 tests

What If Bitcoin?: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.79 ▼0.568.05 ▲6.4938.95 ▼0.26
Dashboard /wp-admin2,207 ▲305.52 ▼0.1889.76 ▲0.2875.94 ▲31.57
Posts /wp-admin/edit.php2,118 ▲182.00 ▲0.0235.34 ▼2.8235.82 ▲0.05
Add New Post /wp-admin/post-new.php1,692 ▲16522.24 ▼0.89677.46 ▼13.9556.16 ▼4.54
Media Library /wp-admin/upload.php1,412 ▲154.23 ▲0.09103.79 ▼29.5272.40 ▲19.93

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/what-if-bitcoin/uninstall.php
    • > /wp-content/plugins/what-if-bitcoin/what-if-bitcoin.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/what-if-bitcoin/functions/initial_front_func.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/what-if-bitcoin/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/what-if-bitcoin/functions/admin_function.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/what-if-bitcoin/functions/generate_form_result.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that 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

what-if-bitcoin/what-if-bitcoin.php 85% from 13 tests

This is the main PHP file of "What If Bitcoin?" version 1.1.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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")

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 plugin851 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP135037569
JavaScript4512165
CSS221117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions12
▷ Named functions12100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png2.94KB1.68KB▼ 42.96%
assets/images/lcp-menu-icon.png3.53KB0.94KB▼ 73.45%