67% wp-blockchain

Code Review | WP Blockchain

WordPress plugin WP Blockchain scored67%from 54 tests.

About plugin

  • Plugin page: wp-blockchain
  • Plugin version: 3.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Feb 4, 2019
  • Number of updates: 29
  • Update frequency: every 18.4 days
  • Top authors: peaxi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,009 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.18MB] [CPU: ▼7.11ms] Passed 4 tests

This is a short check of server-side resources used by WP Blockchain
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2048.07 ▲3.54
Dashboard /wp-admin3.47 ▲0.1754.46 ▲0.76
Posts /wp-admin/edit.php3.58 ▲0.2353.39 ▼9.64
Add New Post /wp-admin/post-new.php6.07 ▲0.1889.24 ▼19.98
Media Library /wp-admin/upload.php3.39 ▲0.1637.54 ▲0.43
WP Blockchain /wp-admin/options-general.php?page=wp-blockchain-settings3.9552.92

Server storage [IO: ▲1.85MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • There were 3 files (16.78KB) illegally modified outside of "wp-content/plugins/wp-blockchain/" and "wp-content/uploads/"
    • (new file) wp-content/cache/wp-blockchain-css-panel.css
    • (new file) wp-content/cache/wp-blockchain-css-settings.css
    • (new file) wp-content/cache/wp-blockchain-css-stamps.css
Filesystem: 104 new files
Database: 5 new tables, 8 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

WP Blockchain: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲25814.02 ▼0.246.51 ▲4.5348.99 ▲8.39
Dashboard /wp-admin2,285 ▲945.30 ▲0.40110.75 ▲3.4770.83 ▲30.80
Posts /wp-admin/edit.php2,184 ▲952.49 ▲0.4642.07 ▲1.2940.37 ▲4.54
Add New Post /wp-admin/post-new.php1,598 ▲6323.26 ▲0.06644.30 ▲12.59143.94 ▲88.89
Media Library /wp-admin/upload.php1,486 ▲954.50 ▲0.2795.25 ▼6.5088.15 ▲41.86
WP Blockchain /wp-admin/options-general.php?page=wp-blockchain-settings2,5566.91141.8299.35

Uninstaller [IO: ▲0.02MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp_wpbc_stamps
    • wp_wpbc_stamp_trees
    • wp_wpbc_stamp_tx_confirmations
    • wp_wpbc_stamp_txs
    • wp_wpbc_locks
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • wpbc_last_cron
    • db_upgraded
    • wpbc_cron_key

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-blockchain-settings
    • > Notice in wp-content/plugins/wp-blockchain/inc/settings.php+672
    Undefined index: url

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 fix the following items
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Formatter/Compressed.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WPBC_API_Stamp' not found in wp-content/plugins/wp-blockchain/inc/api/stamp_services/stampery.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Formatter/Compact.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Formatter/Nested.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Formatter/Expanded.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WPBC_API' not found in wp-content/plugins/wp-blockchain/inc/api/block_explorers/blockcypher.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Formatter/Crunched.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\ode' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Node/Number.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WPBC_API' not found in wp-content/plugins/wp-blockchain/inc/api/block_explorers/btc.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-blockchain/inc/lib/scssphp-master/src/Formatter/Debug.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (A stamp on the frontend), #2 (A stamp on the backend (admin bar)), #3 (A stamp on the backend (edition page)), #4 (A stamp on the backend (listing page)), #5 (A certificate page (edition page)), #6 (The settings page)
The official readme.txt might help

wp-blockchain/wp-blockchain.php 92% from 13 tests

The principal PHP file in "WP Blockchain" v. 3.2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • 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 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin21,730 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PO File1314416591

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity58.55
▷ Minimum class complexity1.00
▷ Maximum class complexity695.00
Average method complexity5.39
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
▷ Abstract classes26.90%
▷ Concrete classes2793.10%
▷ Final classes00.00%
▷ Static methods10.26%
▷ Public methods12031.75%
▷ Protected methods24264.02%
▷ Private methods164.23%
▷ Named functions15191.52%
▷ Anonymous functions148.48%
▷ Global constants2630.95%
▷ Class constants5869.05%
▷ Public constants58100.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 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/goodrebels-logo.png8.61KB6.21KB▼ 27.89%
assets/images/goodrebels-logo-wide.png6.41KB5.38KB▼ 16.07%