72% cryptocurrency

Code Review | Cryptocurrency Portfolio Tracker

WordPress plugin Cryptocurrency Portfolio Tracker scored 72% from 54 tests.

About plugin

  • Plugin page: cryptocurrency
  • Plugin version: 0.0.17
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 5.9.2
  • First release: Jan 1, 2018
  • Latest release: May 5, 2018
  • Number of updates: 13
  • Update frequency: every 9.5 days
  • Top authors: matstars (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 3,939 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
Installer ran successfully

Server metrics [RAM: ▲3.92MB] [CPU: ▼271.23ms] Passed 4 tests

An overview of server-side resources used by Cryptocurrency Portfolio Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.45 ▲3.9381.05 ▲14.03
Dashboard /wp-admin7.35 ▲3.9461.59 ▲25.98
Posts /wp-admin/edit.php7.62 ▲3.9764.91 ▲26.48
Add New Post /wp-admin/post-new.php10.86 ▲3.88116.94 ▼1,146.19
Media Library /wp-admin/upload.php7.25 ▲3.9547.06 ▲21.28
Freemius Debug [v.2.0.1] /wp-admin/admin.php?page=freemius7.4750.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 204 new files
Database: no new tables, 4 new options
New WordPress options
fs_accounts
fs_active_plugins
fs_api_cache
fs_debug_mode

Browser metrics Passed 4 tests

An overview of browser requirements for Cryptocurrency Portfolio Tracker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,063 ▲30921.34 ▲5.426.10 ▼1.412.26 ▼0.89
Dashboard /wp-admin3,170 ▲31211.29 ▲5.12197.85 ▲63.68171.97 ▲9.23
Posts /wp-admin/edit.php3,006 ▲3498.32 ▲5.08142.08 ▲76.42150.94 ▲4.27
Add New Post /wp-admin/post-new.php1,688 ▼6422.31 ▲0.73468.71 ▲6.61153.29 ▼6.79
Media Library /wp-admin/upload.php1,781 ▲838.68 ▲3.23171.77 ▲6.59198.87 ▼2.93
Cryptocurrency /wp-admin/crb_carbon_fields_container_cryptocurrency.php260.940.0320.79
Freemius Debug [v.2.0.1] /wp-admin/admin.php?page=freemius1,7517.97133.72130.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode
    • fs_api_cache

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cryptocurrency/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 118× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Scalar_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Widget\\Widget' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Widget.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Term_Condition' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Parent_Condition.php:28
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/cryptocurrency/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Holder_Interface' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Field/Field.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Ancestor_ID_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Cryptocurrency\\Cache\\Cache' not found in wp-content/plugins/cryptocurrency/cryptocurrency/cache/transient.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Field/Radio_Image_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-fields/core/Field/Html_Field.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cryptocurrency/freemius/templates/account/partials/addon.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/crb_carbon_fields_container_cryptocurrency.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_cryptocurrency.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% 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 require attention: The official readme.txt is a good inspiration

cryptocurrency/cryptocurrency.php Passed 13 tests

"Cryptocurrency Portfolio Tracker" version 0.0.17's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
72 characters long description:
Enter your cryptocurrency purchases and track their pricing in real time

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected109,754 lines of code in 486 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14616,00228,55960,151
PHP2468,09419,25932,240
PO File194,5545,4819,983
SVG112213,782
Sass23377772,357
CSS38296125643
JSON700336
Markdown4780234
YAML22028

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,092)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity22.87
▷ Minimum class complexity1.00
▷ Maximum class complexity2,092.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces30
Interfaces5
Traits0
Classes169
▷ Abstract classes169.47%
▷ Concrete classes15390.53%
▷ Final classes10.65%
Methods1,796
▷ Static methods23713.20%
▷ Public methods1,34975.11%
▷ Protected methods1669.24%
▷ Private methods28115.65%
Functions183
▷ Named functions11261.20%
▷ Anonymous functions7138.80%
Constants136
▷ Global constants9469.12%
▷ Class constants4230.88%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%