83% bitcoin-crypto-prices-shortcode

Code Review | Bitcoin & Crypto Prices Shortcode

WordPress plugin Bitcoin & Crypto Prices Shortcode scored 83% from 54 tests.

About plugin

  • Plugin page: bitcoin-crypto-pr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2020
  • Latest release: Mar 9, 2020
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: petejoost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,493 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.10ms] Passed 4 tests

A check of server-side resources used by Bitcoin & Crypto Prices Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.20197.10 ▲150.75
Dashboard /wp-admin3.43 ▲0.1245.35 ▼6.70
Posts /wp-admin/edit.php3.54 ▲0.1847.86 ▼0.13
Add New Post /wp-admin/post-new.php6.01 ▲0.1295.88 ▼4.97
Media Library /wp-admin/upload.php3.35 ▲0.1234.99 ▼0.61
KVP settings /wp-admin/options-general.php?page=kvp-setting3.3232.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
kv_last_update
can_compress_scripts
crypto_table_data

Browser metrics Passed 4 tests

Bitcoin & Crypto Prices Shortcode: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4813.67 ▼1.082.02 ▲0.1442.86 ▼0.92
Dashboard /wp-admin2,213 ▲254.86 ▼1.00105.35 ▼11.8341.99 ▼0.70
Posts /wp-admin/edit.php2,090 ▼22.05 ▲0.0638.89 ▲1.4234.35 ▲0.07
Add New Post /wp-admin/post-new.php1,517 ▲317.36 ▼0.33647.67 ▼30.1454.04 ▲8.68
Media Library /wp-admin/upload.php1,386 ▲14.23 ▲0.0596.00 ▼6.2942.13 ▼3.36
KVP settings /wp-admin/options-general.php?page=kvp-setting8702.0521.7025.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • kv_last_update
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • crypto_table_data
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/bitcoin-crypto-prices-shortcode/settings.php:191

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: crypto, crypto shortcode, bitcoin shortcode, bitcoin, shortco

bitcoin-crypto-prices-shortcode/index.php 77% from 13 tests

The entry point to "Bitcoin & Crypto Prices Shortcode" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • 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
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bitcoin-crypto-prices-shortcode.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected382 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP26359282
CSS2120100

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.50
▷ Minimum class complexity6.00
▷ Maximum class complexity27.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.85MB with 0.41MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/crypto.png2.41KB1.90KB▼ 21.20%
assets/images/spritesheet.png867.75KB215.50KB▼ 75.17%