84% real-time-bitcoin-currency-converter

Code Review | Real-time Bitcoin Converter

WordPress plugin Real-time Bitcoin Converter scored84%from 54 tests.

About plugin

  • Plugin page: real-time-bitcoin...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2016
  • Latest release: Apr 24, 2019
  • Number of updates: 11
  • Update frequency: every 76.5 days
  • Top authors: modernwebservices (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /37,879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.69ms] Passed 4 tests

An overview of server-side resources used by Real-time Bitcoin Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0934.17 ▼5.15
Dashboard /wp-admin3.40 ▲0.0544.96 ▼14.27
Posts /wp-admin/edit.php3.51 ▲0.1546.56 ▼0.54
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.01 ▼3.98
Media Library /wp-admin/upload.php3.32 ▲0.0931.04 ▼3.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Real-time Bitcoin Converter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8714.27 ▲0.051.85 ▲0.1838.13 ▼5.46
Dashboard /wp-admin2,201 ▲205.59 ▼0.1192.63 ▼4.7643.21 ▲4.75
Posts /wp-admin/edit.php2,106 ▲62.02 ▼0.1240.15 ▲1.0735.58 ▼2.31
Add New Post /wp-admin/post-new.php1,543 ▲1518.19 ▼4.93595.41 ▼82.7650.21 ▼3.61
Media Library /wp-admin/upload.php1,406 ▲124.18 ▼0.0395.15 ▼5.0842.13 ▼4.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/real-time-bitcoin-currency-converter/bitcoin-convert.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === real-time-bitcoin-currency-converter === )
The official readme.txt is a good inspiration

real-time-bitcoin-currency-converter/bitcoin-convert.php 92% from 13 tests

Analyzing the main PHP file in "Real-time Bitcoin Converter" version 1.0.7
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("real-time-bitcoin-currency-converter.php" instead of "bitcoin-convert.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
No dangerous file extensions were detected841 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12228445714
JavaScript21742124
CSS1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.83
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods62
▷ Static methods34.84%
▷ Public methods4979.03%
▷ Protected methods1219.35%
▷ Private methods11.61%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants39
▷ Global constants00.00%
▷ Class constants39100.00%
▷ Public constants39100.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/align-left.png0.54KB0.64KB0.00%
assets/js/align-left.png0.54KB0.64KB0.00%