Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲3.21MB] [CPU: ▼269.44ms] Passed 4 tests
Analyzing server-side resources used by WPSmartContracts
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.84 ▲2.32 | 92.04 ▲21.97 |
Dashboard /wp-admin | 7.88 ▲4.47 | 123.44 ▲79.35 |
Posts /wp-admin/edit.php | 8.01 ▲4.36 | 122.24 ▲52.18 |
Add New Post /wp-admin/post-new.php | 8.64 ▲1.67 | 105.74 ▼1,230.18 |
Media Library /wp-admin/upload.php | 7.89 ▲4.60 | 120.37 ▲78.27 |
Add New NFT /wp-admin/post-new.php?post_type=nft | 8.24 | 162.98 |
Add New Collection /wp-admin/post-new.php?post_type=nft-collection | 8.90 | 174.51 |
All Coins /wp-admin/edit.php?post_type=coin | 8.03 | 107.42 |
Batch Mint NFTs /wp-admin/edit.php?post_type=nft&page=nft-batch-mint | 7.88 | 116.89 |
Taxonomies /wp-admin/edit-tags.php?taxonomy=nft-taxonomy&post_type=nft | 7.90 | 124.12 |
Add New /wp-admin/post-new.php?post_type=crowdfunding | 8.24 | 154.70 |
Add New /wp-admin/post-new.php?post_type=coin | 8.24 | 149.58 |
Add New Stake /wp-admin/post-new.php?post_type=staking | 8.24 | 154.79 |
Create Smart Contract /wp-admin/admin.php?page=wpsc_dashboard_menu | 8.20 | 111.83 |
All Crowdfundings /wp-admin/edit.php?post_type=crowdfunding | 8.03 | 104.38 |
Server storage [IO: ▲74.60MB] [DB: ▲0.04MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
- Total filesystem usage should be limited to 25MB (currently using 74.60MB)
Filesystem: 1,318 new files
Database: no new tables, 5 new options
New WordPress options |
---|
NFT_permalinks_flushed |
wpsc_onetime_notice_1 |
coin_permalinks_flushed |
crowdfunding_permalinks_flushed |
Staking_permalinks_flushed |
Browser metrics Passed 4 tests
Checking browser requirements for WPSmartContracts
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,626 ▲872 | 24.86 ▲9.80 | 25.73 ▲14.82 | 3.86 ▲0.43 |
Dashboard /wp-admin | 3,540 ▲655 | 13.74 ▲7.30 | 670.42 ▲443.70 | 244.80 ▲16.37 |
Posts /wp-admin/edit.php | 3,459 ▲774 | 10.43 ▲7.01 | 172.22 ▲44.25 | 215.38 ▼27.04 |
Add New Post /wp-admin/post-new.php | 2,148 ▲481 | 27.32 ▲7.57 | 780.14 ▲59.03 | 200.38 ▼20.35 |
Media Library /wp-admin/upload.php | 2,615 ▲923 | 12.61 ▲6.89 | 276.93 ▲93.05 | 273.55 ▲23.33 |
Add New NFT /wp-admin/post-new.php?post_type=nft | 5,233 | 17.82 | 381.17 | 480.74 |
Add New Collection /wp-admin/post-new.php?post_type=nft-collection | 8,699 | 17.08 | 445.89 | 594.64 |
All Coins /wp-admin/edit.php?post_type=coin | 2,208 | 10.18 | 177.53 | 195.55 |
Batch Mint NFTs /wp-admin/edit.php?post_type=nft&page=nft-batch-mint | 2,750 | 11.56 | 183.98 | 331.93 |
Taxonomies /wp-admin/edit-tags.php?taxonomy=nft-taxonomy&post_type=nft | 2,245 | 10.04 | 163.42 | 191.03 |
Add New /wp-admin/post-new.php?post_type=crowdfunding | 5,817 | 15.99 | 405.41 | 502.51 |
Add New /wp-admin/post-new.php?post_type=coin | 6,418 | 16.10 | 402.07 | 494.79 |
Add New Stake /wp-admin/post-new.php?post_type=staking | 6,167 | 15.68 | 368.71 | 523.24 |
Create Smart Contract /wp-admin/admin.php?page=wpsc_dashboard_menu | 2,300 | 9.84 | 151.80 | 265.64 |
All Crowdfundings /wp-admin/edit.php?post_type=crowdfunding | 2,240 | 10.27 | 164.74 | 184.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.04MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Zombie WordPress options were found after uninstall: 5 options
- Staking_permalinks_flushed
- crowdfunding_permalinks_flushed
- wpsc_onetime_notice_1
- NFT_permalinks_flushed
- coin_permalinks_flushed
Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/bin/build_bootstrap.php
- 72× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/Loader/InlineLoaderTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/AutoloaderTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownFilterExceptionTest.php:12
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/../vendor/yaml/lib/sfYamlParser.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/bootstrap.php on line 16
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/HelperCollectionTest.php:12
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/ContextTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/Source/FilesystemSourceTest.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/PartialLambdaIndentTest.php:16
- > PHP Fatal error
Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php:50
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=staking
- > Network (severe)
http://localhost/wpsc/wp-content/plugins/wp-smart-contracts/assets/img/deploy-identicon.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/post-new.php?post_type=nft-collection
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2 1:31592 "jQuery.Deferred exception: web3 is not defined" "ReferenceError: web3 is not defined\n at getNetworkVersion (/wp-content/plugins/wp-smart-contracts/assets/js/wpsc.js?ver=5.9.2:1:2898290)\n at doLoadOtherNetworks (/wp-content/plugins/wp-smart-contracts/assets/js/wpsc.js?ver=5.9.2:1:11228769)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-smart-contracts/assets/js/wpsc.js?ver=5.9.2:1:13306254)" undefined
- > GET request to /wp-admin/post-new.php?post_type=nft-collection
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2 1:31702 Uncaught ReferenceError: web3 is not defined
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=staking
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31592 "jQuery.Deferred exception: web3 is not defined" "ReferenceError: web3 is not defined\n at getNetworkVersion (/wp-content/plugins/wp-smart-contracts/assets/js/wpsc.js?ver=5.9.2:1:2898290)\n at doLoadOtherNetworks (/wp-content/plugins/wp-smart-contracts/assets/js/wpsc.js?ver=5.9.2:1:11228769)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-smart-contracts/assets/js/wpsc.js?ver=5.9.2:1:13306254)" undefined
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=staking
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31702 Uncaught ReferenceError: web3 is not defined
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% 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
Please fix the following attributes:
- Screenshots: Add descriptions for screenshots #7, #8, #9 in wp-smart-contracts/assets to your readme.txt
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
wp-smart-contracts/wp-smart-contracts.php Passed 13 tests
The main PHP script in "WPSmartContracts" version 1.3.5 is automatically included on every request by WordPress
73 characters long description:
Easily create powerful Smart Contracts in a dozen of blockchain networks.
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please make sure to remedy the following
- For security reasons, never distribute binary or executable files with your plugin
- .ms - Maxwell Script in Maxwell Render
- ☣ wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/fixtures/templates/alpha.ms
- ☣ wp-content/plugins/wp-smart-contracts/classes/vendor/mustache/mustache/test/fixtures/templates/beta.ms
- .ms - Maxwell Script in Maxwell Render
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 157 | 9,428 | 12,292 | 82,782 |
CSS | 100 | 11,078 | 9,109 | 56,799 |
Mustache | 211 | 3,391 | 3 | 20,783 |
LESS | 48 | 3,261 | 3,791 | 19,722 |
PHP | 151 | 3,892 | 4,145 | 15,716 |
SVG | 16 | 3 | 25 | 6,184 |
PO File | 2 | 1,046 | 1,320 | 2,806 |
JSON | 7 | 0 | 0 | 794 |
Markdown | 5 | 55 | 0 | 117 |
HTML | 2 | 10 | 0 | 29 |
YAML | 2 | 6 | 0 | 28 |
XML | 1 | 2 | 0 | 15 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 11.46 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 260.00 |
Average method complexity | 3.17 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 67.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 6 | |
Traits | 0 | |
Classes | 147 | |
▷ Abstract classes | 5 | 3.40% |
▷ Concrete classes | 142 | 96.60% |
▷ Final classes | 0 | 0.00% |
Methods | 770 | |
▷ Static methods | 166 | 21.56% |
▷ Public methods | 671 | 87.14% |
▷ Protected methods | 19 | 2.47% |
▷ Private methods | 80 | 10.39% |
Functions | 60 | |
▷ Named functions | 9 | 15.00% |
▷ Anonymous functions | 51 | 85.00% |
Constants | 68 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 68 | 100.00% |
▷ Public constants | 68 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
97 PNG files occupy 14.53MB with 10.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/bluemoon-flavor.png | 7.25KB | 2.97KB | ▼ 59.07% |
assets/img/icon-nft-collection-dark.png | 8.27KB | 0.91KB | ▼ 88.99% |
assets/img/icon-nft-collection.png | 8.59KB | 0.91KB | ▼ 89.41% |
assets/img/skin0.png | 394.59KB | 114.29KB | ▼ 71.04% |
assets/img/heco-network.png | 22.92KB | 12.48KB | ▼ 45.53% |