84% exchange-rate-privatbank

Code Review | Курс валют ПриватБанка

WordPress plugin Курс валют ПриватБанка scored84%from 54 tests.

About plugin

  • Plugin page: exchange-rate-pri...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Aug 24, 2023
  • Number of updates: 5
  • Update frequency: every 340.0 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /918 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.06ms] Passed 4 tests

This is a short check of server-side resources used by Курс валют ПриватБанка
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.78 ▲4.37
Dashboard /wp-admin3.34 ▼0.0045.87 ▼12.68
Posts /wp-admin/edit.php3.45 ▲0.1044.96 ▲0.41
Add New Post /wp-admin/post-new.php5.93 ▲0.0478.05 ▼14.06
Media Library /wp-admin/upload.php3.26 ▲0.0432.56 ▼1.91

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Курс валют ПриватБанка: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.36 ▲0.011.71 ▲0.1444.11 ▲2.11
Dashboard /wp-admin2,198 ▲215.64 ▼0.0394.95 ▲8.3941.54 ▲2.88
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.1034.39 ▼0.6432.65 ▼5.29
Add New Post /wp-admin/post-new.php6,198 ▲4,67018.99 ▼4.03902.61 ▲255.9764.68 ▲16.39
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0096.10 ▼13.6339.84 ▼12.36

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected 'public' (T_PUBLIC) in wp-content/plugins/exchange-rate-privatbank/includes/core/widgets.php on line 115

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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:
  • Tags: No valid plugin tags found
The official readme.txt might help

exchange-rate-privatbank/exchange-rate-privatbank.php 92% from 13 tests

The main PHP script in "Курс валют ПриватБанка" version 2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 169 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,550 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
CSS84352,262
SVG100685
JavaScript1266136269
PHP11157117259
JSON20034
PO File18833
Sass2008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods22
▷ Static methods29.09%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin