83% currency-rates-of-the-russian-ruble

Code Review | Currency Rates of Russian Ruble

WordPress plugin Currency Rates of Russian Ruble scored83%from 54 tests.

About plugin

  • Plugin page: currency-rates-of...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2018
  • Latest release: Dec 15, 2018
  • Number of updates: 10
  • Update frequency: every 3.0 days
  • Top authors: yuriuss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.62ms] Passed 4 tests

This is a short check of server-side resources used by Currency Rates of Russian Ruble
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.12 ▼2.98
Dashboard /wp-admin3.32 ▲0.0247.99 ▼0.09
Posts /wp-admin/edit.php3.37 ▲0.0246.92 ▼11.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.06 ▼14.06
Media Library /wp-admin/upload.php3.24 ▲0.0236.40 ▼2.41
Currency rates of ruble /wp-admin/options-general.php?page=cur-rates-submenu3.26114.83

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Currency Rates of Russian Ruble
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.24 ▼1.301.63 ▼0.9043.55 ▼4.32
Dashboard /wp-admin2,212 ▲214.89 ▲0.00127.46 ▲28.5948.03 ▲4.11
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0935.20 ▼0.4131.04 ▼4.25
Add New Post /wp-admin/post-new.php1,519 ▼1517.60 ▼5.46651.93 ▼18.2957.11 ▼3.46
Media Library /wp-admin/upload.php1,394 ▲124.24 ▲0.0995.87 ▼3.2542.68 ▼1.26
Currency rates of ruble /wp-admin/options-general.php?page=cur-rates-submenu1,5402.0525.8530.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/currency-rates-of-the-russian-ruble/cur-rates-admin.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Пример отображения курсов в админке) image required
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

currency-rates-of-the-russian-ruble/cur-rates-cb.php 85% from 13 tests

"Currency Rates of Russian Ruble" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("currency-rates-of-the-russian-ruble.php" instead of "cur-rates-cb.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected563 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON100395
PHP32039113
PO File1121339
CSS10016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.56MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.38KB11.63KB▼ 59.01%
screenshot-2.png15.79KB6.05KB▼ 61.66%
Screenshot2.png15.79KB6.05KB▼ 61.66%
screenshot-3.png487.66KB200.66KB▼ 58.85%
Screenshot1.png28.39KB11.63KB▼ 59.01%