84% rk-currency-rates

Code Review | RK currency rates

WordPress plugin RK currency rates scored84%from 54 tests.

About plugin

  • Plugin page: rk-currency-rates
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 26, 2018
  • Latest release: Jun 28, 2018
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: botyk87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /708 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.58ms] Passed 4 tests

Server-side resources used by RK currency rates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.07 ▼6.02
Dashboard /wp-admin3.34 ▲0.0452.35 ▲2.05
Posts /wp-admin/edit.php3.39 ▲0.0450.30 ▲2.28
Add New Post /wp-admin/post-new.php5.92 ▲0.04102.65 ▲4.67
Media Library /wp-admin/upload.php3.27 ▲0.0439.43 ▲4.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by RK currency rates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.071.83 ▼0.6839.88 ▼4.42
Dashboard /wp-admin2,195 ▲155.65 ▼0.0590.13 ▼7.8238.87 ▼6.88
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0139.46 ▲2.1734.96 ▼3.39
Add New Post /wp-admin/post-new.php1,364 ▼16916.49 ▼6.62571.63 ▼81.6145.34 ▼3.39
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.1299.92 ▼18.8047.41 ▼1.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rk-currency-rates/rk-currency-rates.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: nationalbank, rates, currency, rk

rk-currency-rates/rk-currency-rates.php 92% from 13 tests

The main PHP file in "RK currency rates" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 223 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
Everything looks great! No dangerous files found in this plugin159 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP241191
CSS214268

PHP code Passed 2 tests

An short overview of 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.37
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%
Functions2
▷ Named functions2100.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.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png0.23KB0.13KB▼ 44.30%
img/flags.png67.63KB23.28KB▼ 65.58%