84% russian-currency

Code Review | Russian Currency

WordPress plugin Russian Currency scored84%from 54 tests.

About plugin

  • Plugin page: russian-currency
  • Plugin version: 1.53
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2015
  • Latest release: Oct 30, 2022
  • Number of updates: 29
  • Update frequency: every 93.0 days
  • Top authors: Flector (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /10,266 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.83ms] Passed 4 tests

Server-side resources used by Russian Currency
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0734.38 ▼0.36
Dashboard /wp-admin3.38 ▲0.0744.88 ▼1.78
Posts /wp-admin/edit.php3.43 ▲0.0746.29 ▲1.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.29 ▼13.69
Media Library /wp-admin/upload.php3.30 ▲0.0733.57 ▲0.52

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_russian_currency
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Russian Currency
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.34 ▼0.051.55 ▼0.1644.04 ▲2.10
Dashboard /wp-admin2,198 ▲215.58 ▼0.0983.27 ▼3.2139.31 ▼1.18
Posts /wp-admin/edit.php2,103 ▲61.96 ▼0.0736.31 ▼0.6832.28 ▼5.92
Add New Post /wp-admin/post-new.php1,526 ▼223.37 ▲0.25681.43 ▲10.0558.65 ▲0.81
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0397.30 ▼8.9040.23 ▼14.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_russian_currency
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/russian-currency/russian-currency.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: exchange, eur, currency, rub, widget...

russian-currency/russian-currency.php Passed 13 tests

This is the main PHP file of "Russian Currency" version 1.53, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
89 characters long description:
Виджет с официальными и биржевыми курсами валют.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin320 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17210311
CSS1009

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 are no PNG files in this plugin