78% kriptomat-cryptocurrency-price-widget

Code Review | Kriptomat Cryptocurrency Price Widgets

WordPress plugin Kriptomat Cryptocurrency Price Widgets scored78%from 54 tests.

About plugin

  • Plugin page: kriptomat-cryptoc...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 11, 2021
  • Latest release: Aug 12, 2021
  • Number of updates: 8
  • Update frequency: every 1.1 days
  • Top authors: kriptomatwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.34MB] [CPU: ▼8.49ms] Passed 4 tests

Server-side resources used by Kriptomat Cryptocurrency Price Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3238.80 ▼1.75
Dashboard /wp-admin3.66 ▲0.3247.03 ▼17.39
Posts /wp-admin/edit.php3.77 ▲0.4245.28 ▲5.55
Add New Post /wp-admin/post-new.php6.24 ▲0.3582.93 ▼18.28
Media Library /wp-admin/upload.php3.60 ▲0.3737.54 ▲3.45
Plugin Menu /wp-admin/options-general.php?page=myplugin3.5232.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 260 new files
Database: no new tables, 41 new options
New WordPress options
kriptomatpricewidgets_option_colourBannerBackground
kriptomatpricewidgets_option_tickerchoice2
kriptomatpricewidgets_option_tickerchoice1
kriptomatpricewidgets_option_colourRowEven
kriptomatpricewidgets_option_colourBuyBackground_Calc
kriptomatpricewidgets_option_tickerchoice11
kriptomatpricewidgets_option_colourMarqueeBackground
kriptomatpricewidgets_option_tickerchoice10
kriptomatpricewidgets_option_tickerchoice8
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kriptomat Cryptocurrency Price Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.60 ▼0.695.28 ▲3.5136.39 ▼8.60
Dashboard /wp-admin2,212 ▲215.85 ▲0.94107.51 ▲5.5338.00 ▲0.58
Posts /wp-admin/edit.php2,095 ▲62.05 ▼0.0139.93 ▲0.2635.41 ▼2.18
Add New Post /wp-admin/post-new.php1,519 ▼917.66 ▼0.68665.46 ▲54.7552.80 ▲0.70
Media Library /wp-admin/upload.php1,394 ▲124.20 ▲0.05104.10 ▲6.4547.59 ▲3.56
Plugin Menu /wp-admin/options-general.php?page=myplugin2,8972.0424.6466.96

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 41 options in the database
    • kriptomatpricewidgets_option_colourOptionBackground_Calc
    • kriptomatpricewidgets_option_tickerchoice13
    • kriptomatpricewidgets_option_colourBuyBackground_Calc
    • kriptomatpricewidgets_option_colourBackground_Calc
    • kriptomatpricewidgets_option_tickerchoice12
    • kriptomatpricewidgets_option_colourMarqueeText
    • kriptomatpricewidgets_option_colourText_Calc
    • kriptomatpricewidgets_option_colourBannerBackground_Calc
    • kriptomatpricewidgets_option_tickerchoice9
    • kriptomatpricewidgets_option_colourMarqueeBackground
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+887
    Undefined variable: svgdown
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+1270
    Undefined variable: r
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+1270
    Undefined variable: g
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+1270
    Undefined variable: b
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+1410
    Undefined index: propy
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+1410
    Undefined index: rep
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=myplugin
    • > Notice in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php+1410
    Undefined index: xtv

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php:120

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: You can take inspiration from this readme.txt

kriptomat-cryptocurrency-price-widget/Kriptomat_WP_Plugin.php 92% from 13 tests

The principal PHP file in "Kriptomat Cryptocurrency Price Widgets" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kriptomat-cryptocurrency-price-widget.php" instead of "Kriptomat_WP_Plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin6,168 lines of code in 256 files:
LanguageFilesBlank linesComment linesLines of code
PHP15691493,481
SVG255032,687

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/eur.png9.22KB3.35KB▼ 63.72%
images/dash.png31.92KB13.10KB▼ 58.96%