72% bitcoin-online

Code Review | Bitcoin Online shortcode

WordPress plugin Bitcoin Online shortcode scored72%from 54 tests.

About plugin

  • Plugin page: bitcoin-online
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Feb 19, 2014
  • Number of updates: 22
  • Update frequency: every 0.8 days
  • Top authors: pavel.rechberg (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /5,537 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.15ms] Passed 4 tests

An overview of server-side resources used by Bitcoin Online shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.54 ▼2.65
Dashboard /wp-admin3.36 ▲0.0646.88 ▲2.94
Posts /wp-admin/edit.php3.48 ▲0.1246.64 ▼0.45
Add New Post /wp-admin/post-new.php5.94 ▲0.0689.22 ▲3.66
Media Library /wp-admin/upload.php3.29 ▲0.0635.89 ▼0.42
Bitcoin online /wp-admin/options-general.php?page=bitcoin-online3.2631.93

Server storage [IO: ▲0.11MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Bitcoin Online shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,054 ▲29314.30 ▼0.0520.32 ▲18.1742.22 ▼7.81
Dashboard /wp-admin2,199 ▲225.59 ▲0.0183.64 ▼3.2538.39 ▼2.02
Posts /wp-admin/edit.php2,104 ▲252.00 ▼0.0441.87 ▲6.6535.89 ▲1.18
Add New Post /wp-admin/post-new.php1,531 ▼423.24 ▲4.93637.10 ▲9.3174.54 ▼12.22
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0195.28 ▼1.9943.91 ▲2.72
Bitcoin online /wp-admin/options-general.php?page=bitcoin-online9942.2036.0130.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bitcoin-online/public/views/public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bitcoin-online/admin/views/admin.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=bitcoin-online
    • > Network (severe)
    wp-content/plugins/bitcoin-online/admin/assets/js/jquery.number.min.js - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=bitcoin-online
    • > Network (severe)
    wp-content/plugins/bitcoin-online/admin/assets/js/admin.js?ver=1.1.0 39 WebSocket connection to 'ws://markets.blockchain.info:8080/ws/markets/chat/markets_mtgox_USD?_=1391587028779' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

bitcoin-online/bitcoin_online.php 85% from 13 tests

The main PHP script in "Bitcoin Online shortcode" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bitcoin-online.php" instead of "bitcoin_online.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin339 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7117315291
JavaScript116048
CSS2020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity6.00
▷ Maximum class complexity16.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods729.17%
▷ Public methods1875.00%
▷ Protected methods00.00%
▷ Private methods625.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin