78% widgets-bitcoin

Code Review | Bitcoin Widgets

WordPress plugin Bitcoin Widgets scored 78% from 54 tests.

About plugin

  • Plugin page: widgets-bitcoin
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Jun 1, 2020
  • Latest release: Jul 14, 2020
  • Number of updates: 6
  • Update frequency: every 7.7 days
  • Top authors: bananainternational (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 5,013 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Bitcoin Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0534.81 ▼8.33
Dashboard /wp-admin3.35 ▲0.0445.87 ▼4.96
Posts /wp-admin/edit.php3.40 ▲0.0450.23 ▲4.07
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.66 ▲5.46
Media Library /wp-admin/upload.php3.27 ▲0.0431.08 ▼2.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_bananawb_widget_prices

Browser metrics Passed 4 tests

An overview of browser requirements for Bitcoin Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.26 ▼1.321.79 ▼0.1038.14 ▼12.48
Dashboard /wp-admin2,203 ▲154.85 ▼0.06106.81 ▼11.0741.10 ▼6.54
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0140.51 ▲4.0835.35 ▲3.59
Add New Post /wp-admin/post-new.php1,537 ▲2323.45 ▲5.93641.80 ▼45.8362.13 ▲8.03
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.00101.30 ▼0.3043.98 ▼1.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_bananawb_widget_prices

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/widgets-bitcoin/includes/bananawb-acp-page.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-bitcoin/includes/bananawb-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widgets-bitcoin/includes/bananawb-widget-prices.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-bitcoin/widget-bitcoin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Standart widget view.), #2 (Widget options view.)
The official readme.txt is a good inspiration

widgets-bitcoin/widget-bitcoin.php 92% from 13 tests

The main PHP script in "Bitcoin Widgets" version 1.1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("widgets-bitcoin.php" instead of "widget-bitcoin.php")

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 plugin278 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44228175
CSS222098
SVG1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity8.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin