94% ukrainian-currency

Code Review | Курс валют UAH

WordPress plugin Курс валют UAH scored 94% from 54 tests.

About plugin

  • Plugin page: ukrainian-currency
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3
  • WordPress version: 5.8.1
  • First release: Oct 11, 2019
  • Latest release: Feb 1, 2020
  • Number of updates: 5
  • Update frequency: every 22.6 days
  • Top authors: glopium (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 592 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼139.50ms] Passed 4 tests

Analyzing server-side resources used by Курс валют UAH
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1936.80 ▲16.13
Dashboard /wp-admin3.20 ▲0.1444.13 ▲0.36
Posts /wp-admin/edit.php3.25 ▲0.1447.92 ▲4.39
Add New Post /wp-admin/post-new.php5.50 ▲0.0686.84 ▼561.96
Media Library /wp-admin/upload.php3.08 ▲0.0833.29 ▼0.78

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Курс валют UAH
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲24917.08 ▲1.1817.44 ▲7.2250.71 ▲4.33
Dashboard /wp-admin3,011 ▲777.20 ▲1.23141.28 ▼2.91117.75 ▲5.62
Posts /wp-admin/edit.php2,777 ▲382.75 ▲0.0681.38 ▲18.8092.18 ▲0.81
Add New Post /wp-admin/post-new.php1,899 ▲22719.39 ▲0.46393.30 ▲25.68128.67 ▲18.72
Media Library /wp-admin/upload.php1,848 ▲385.54 ▲0.51157.79 ▲9.60114.06 ▼2.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ukrainian-currency/includes/admin/views/main-page.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please add at least on tag
Please take inspiration from this readme.txt

ukrainian-currency/exchange-rate-yan.php 92% from 13 tests

The main PHP script in "Курс валют UAH" version 2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ukrainian-currency.php" instead of "exchange-rate-yan.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin3,436 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS60172,228
SVG100685
PHP23369318478
PO File18833
JavaScript83710
HTML2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.78
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.32
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes15.88%
Methods47
▷ Static methods1327.66%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin