10% cryptocurrency-rocket-tools

Code Review | Cryptocurrency Rocket Tools

WordPress plugin Cryptocurrency Rocket Tools scored 10% from 54 tests.

About plugin

  • Plugin page: cryptocurrency-ro...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.7
  • WordPress version: 5.9.2
  • First release: Oct 28, 2017
  • Latest release: Jul 9, 2018
  • Number of updates: 27
  • Update frequency: every 9.5 days
  • Top authors: webstulle (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

700+ active / 18,199 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/cryptocurrency-rocket-tools/cryptocurrency-rocket-tools.php+78
    file_get_contents(https://api.coinmarketcap.com/v1/ticker/?limit=10000): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable

Server metrics [RAM: ▼1.22MB] [CPU: ▼284.19ms] Passed 4 tests

Analyzing server-side resources used by Cryptocurrency Rocket Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.15 ▼0.3773.97 ▲23.08
Dashboard /wp-admin3.17 ▼0.24105.34 ▲71.12
Posts /wp-admin/edit.php3.17 ▼0.4759.69 ▲24.63
Add New Post /wp-admin/post-new.php3.17 ▼3.8056.20 ▼1,210.99
Media Library /wp-admin/upload.php3.17 ▼0.1352.55 ▲26.51
Settings /wp-admin/admin.php?page=crtools&tab=13.1760.03
Options Object /wp-admin/admin.php?page=crtools&tab=123.1757.91
Redux Framework /wp-admin/tools.php?page=redux-about3.1771.55
Documentation /wp-admin/admin.php?page=crtools&tab=73.1789.97
Import / Export /wp-admin/admin.php?page=crtools&tab=133.1756.22

Server storage [IO: ▲31.75MB] [DB: ▲0.06MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 31.75MB)
Filesystem: 2,687 new files
Database: no new tables, 3 new options
New WordPress options
crtools_redux
redux_version_upgraded_from
crtools_redux-transients

Browser metrics Passed 4 tests

An overview of browser requirements for Cryptocurrency Rocket Tools
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,051 ▲32916.77 ▲0.7911.32 ▲5.562.80 ▲0.54
Dashboard /wp-admin3,034 ▲1766.03 ▼0.15136.34 ▼5.20178.92 ▲19.91
Posts /wp-admin/edit.php2,759 ▲1022.94 ▼0.3063.82 ▼0.61147.34 ▲3.77
Add New Post /wp-admin/post-new.php1,874 ▲12223.95 ▲3.02424.55 ▼38.55169.71 ▲9.01
Media Library /wp-admin/upload.php1,769 ▲715.50 ▲0.01127.87 ▼30.23192.15 ▲3.69
Settings /wp-admin/admin.php?page=crtools&tab=12,9284.8190.58207.13
Options Object /wp-admin/admin.php?page=crtools&tab=122,9044.7288.07190.87
Redux Framework /wp-admin/tools.php?page=redux-about1,4083.7799.53208.68
Documentation /wp-admin/admin.php?page=crtools&tab=72,9314.6190.09192.30
Import / Export /wp-admin/admin.php?page=crtools&tab=132,9014.7286.85186.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/cryptocurrency-rocket-tools/cryptocurrency-rocket-tools.php+78
    file_get_contents(https://api.coinmarketcap.com/v1/ticker/?limit=10000): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable

  • This plugin did not uninstall successfully, leaving 3 options in the database
    • redux_version_upgraded_from
    • crtools_redux-transients
    • crtools_redux

Smoke tests 25% 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
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crtools&tab=13
    • > Warning in wp-content/plugins/cryptocurrency-rocket-tools/cryptocurrency-rocket-tools.php+78
    file_get_contents(https://api.coinmarketcap.com/v1/ticker/?limit=10000): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable

  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crtools&tab=13
    • > Notice in wp-content/plugins/cryptocurrency-rocket-tools/cryptocurrency-rocket-tools.php+84
    Undefined variable: coinList

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
Almost there! Just fix the following items
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/inc/extensions/customizer/inc/customizer_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/templates/panel/header_stickybar.tpl.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/inc/extensions/customizer/inc/customizer_section.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/inc/welcome/views/about.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/inc/welcome/views/extensions.php:64
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/templates/panel/content.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/templates/panel/container.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/inc/extensions/customizer/inc/customizer_devs.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/cryptocurrency-rocket-tools/frameworks/ReduxFramework/ReduxCore/inc/themecheck/checks/embedded.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=crtools&tab=1
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=crtools&tab=1 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=a503f39ad1&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Da503f39ad1%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=crtools&tab=12
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=crtools&tab=12 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=a503f39ad1&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Da503f39ad1%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=crtools&tab=7
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=crtools&tab=7 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=a503f39ad1&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Da503f39ad1%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=crtools&tab=13
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=crtools&tab=13 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=a503f39ad1&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Da503f39ad1%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Tags: You are using too many tags: 23 tag instead of maximum 10
You can take inspiration from this readme.txt

cryptocurrency-rocket-tools/cryptocurrency-rocket-tools.php Passed 13 tests

The principal PHP file in "Cryptocurrency Rocket Tools" v. 2.2 is loaded by WordPress automatically on each request
74 characters long description:
Price ticker, table, graph, converter, price list of all cryptocurrencies.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected92,843 lines of code in 344 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript9313,59917,44961,572
PHP1204,1676,31718,617
Sass541,184607,579
Markdown865801,837
SVG4031,022
JSON31840980
CSS495742464
PO File3171171390
Bourne Shell43150122
XML310111
HTML17060
LESS10053
YAML102036

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity31.54
▷ Minimum class complexity1.00
▷ Maximum class complexity882.00
Average method complexity6.31
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes107
▷ Abstract classes00.00%
▷ Concrete classes107100.00%
▷ Final classes00.00%
Methods616
▷ Static methods12920.94%
▷ Public methods46375.16%
▷ Protected methods9114.77%
▷ Private methods6210.06%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants70
▷ Global constants45.71%
▷ Class constants6694.29%
▷ Public constants66100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2078 PNG files occupy 22.10MB with 9.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/coins/sense.png3.89KB2.07KB▼ 46.70%
assets/images/coins/nbt.png9.23KB5.27KB▼ 42.85%
assets/images/coins/bashc.png19.75KB8.07KB▼ 59.15%
assets/images/coins/xvs.png5.40KB2.36KB▼ 56.30%
assets/images/coins/cs.png2.10KB2.29KB0.00%