84% bitcoin-price-tooltip

Code Review | Bitcoin price tooltip

WordPress plugin Bitcoin price tooltip scored84%from 54 tests.

About plugin

  • Plugin page: bitcoin-price-too...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: May 24, 2023
  • Number of updates: 16
  • Update frequency: every 13.1 days
  • Top authors: gasparmontero (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,011 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲40.82ms] Passed 4 tests

An overview of server-side resources used by Bitcoin price tooltip
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.10217.31 ▲178.80
Dashboard /wp-admin3.32 ▲0.0144.13 ▼1.43
Posts /wp-admin/edit.php3.37 ▲0.0142.60 ▼4.43
Add New Post /wp-admin/post-new.php5.90 ▲0.01261.37 ▲165.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.46 ▲3.27

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Bitcoin price tooltip
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8214.48 ▲0.101.97 ▲0.2934.79 ▼14.04
Dashboard /wp-admin2,203 ▲125.84 ▼0.19100.38 ▼9.5840.43 ▼5.33
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0033.92 ▼8.3533.62 ▲2.63
Add New Post /wp-admin/post-new.php1,519 ▲523.04 ▲5.57613.36 ▼33.2746.75 ▼3.58
Media Library /wp-admin/upload.php1,385 ▼64.22 ▼0.02100.99 ▲5.5343.89 ▲3.35

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bitcoin-price-tooltip/btc-price-tooltip.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

bitcoin-price-tooltip/btc-price-tooltip.php 92% from 13 tests

The principal PHP file in "Bitcoin price tooltip" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bitcoin-price-tooltip.php" instead of "btc-price-tooltip.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected72 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS13039
PHP16833

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin