78% crypto-price-widgets

Code Review | WazirX - Free Cryptocurrency Widgets | Price Ticker & Coin List

WordPress plugin WazirX - Free Cryptocurrency Widgets | Price Ticker & Coin List scored78%from 54 tests.

About plugin

  • Plugin page: crypto-price-widgets
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8
  • WordPress version: 6.3.1
  • First release: Jan 10, 2022
  • Latest release: May 23, 2022
  • Number of updates: 9
  • Update frequency: every 15.0 days
  • Top authors: luthra.sunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.42MB] [CPU: ▲6.90ms] Passed 4 tests

A check of server-side resources used by WazirX - Free Cryptocurrency Widgets | Price Ticker & Coin List
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.93 ▲1.4648.79 ▲8.14
Dashboard /wp-admin4.73 ▲1.4264.87 ▲15.18
Posts /wp-admin/edit.php4.78 ▲1.4268.19 ▲18.79
Add New Post /wp-admin/post-new.php7.33 ▲1.4495.14 ▼7.59
Media Library /wp-admin/upload.php4.63 ▲1.4047.26 ▲11.86
WRX Crypto Widgets /wp-admin/admin.php?page=wx-crypto-shortocodes-options4.6746.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 597 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WazirX - Free Cryptocurrency Widgets | Price Ticker & Coin List
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,218 ▲48320.23 ▲5.8519.53 ▲17.4736.71 ▼7.41
Dashboard /wp-admin2,497 ▲3099.33 ▲4.29184.41 ▲81.0741.82 ▲0.26
Posts /wp-admin/edit.php2,437 ▲3486.18 ▲4.1872.88 ▲30.0330.05 ▼6.18
Add New Post /wp-admin/post-new.php1,600 ▲7220.08 ▲1.76768.79 ▲133.5438.51 ▼14.47
Media Library /wp-admin/upload.php1,542 ▲1546.71 ▲2.43108.89 ▲4.1144.44 ▲0.44
WRX Crypto Widgets /wp-admin/admin.php?page=wx-crypto-shortocodes-options1,2806.6187.2227.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/crypto-price-widgets/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/crypto-price-widgets/admin/partials/wx-crypto-shortcodes-admin-display.php
    • > /wp-content/plugins/crypto-price-widgets/public/partials/wx-crypto-shortcodes-public-display.php
  • 213× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crypto-price-widgets/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crypto-price-widgets/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Datastore' not found in wp-content/plugins/crypto-price-widgets/vendor/htmlburger/carbon-fields/core/Datastore/Key_Value_Datastore.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crypto-price-widgets/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php:4
    • > PHP Notice
      Undefined variable: hideErrorsCookieName in wp-content/plugins/crypto-price-widgets/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crypto-price-widgets/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crypto-price-widgets/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container' not found in wp-content/plugins/crypto-price-widgets/vendor/htmlburger/carbon-fields/core/Block.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/crypto-price-widgets/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Interface' not found in wp-content/plugins/crypto-price-widgets/vendor/htmlburger/carbon-fields/core/Datastore/Datastore.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #6 (Crypto Return Calculator), #7 (Crypto Past Performance Calculator)
You can look at the official readme.txt

crypto-price-widgets/crypto-price-widgets.php 92% from 13 tests

"WazirX - Free Cryptocurrency Widgets | Price Ticker & Coin List" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin64,012 lines of code in 534 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17511,63917,59245,888
PHP2642,9987,59511,441
PO File268191,0202,202
CSS103301,1591,863
Sass4833901,769
JSON500658
YAML3313123
Markdown324068

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.49
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces5
Traits0
Classes230
▷ Abstract classes125.22%
▷ Concrete classes21894.78%
▷ Final classes10.46%
Methods1,033
▷ Static methods928.91%
▷ Public methods81779.09%
▷ Protected methods19919.26%
▷ Private methods171.65%
Functions112
▷ Named functions2623.21%
▷ Anonymous functions8676.79%
Constants37
▷ Global constants1027.03%
▷ Class constants2772.97%
▷ Public constants27100.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
6 PNG files occupy 0.29MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/cryptopastperformance.png46.10KB15.08KB▼ 67.28%
admin/images/pricechart.png51.87KB19.37KB▼ 62.66%
admin/images/cryptoreturnscalculator.png42.05KB14.04KB▼ 66.61%
admin/images/bitcoincryptoconverter.png31.12KB11.64KB▼ 62.61%
admin/images/pricetable.png101.41KB36.72KB▼ 63.79%