84% cbrrate

Code Review | CbrRate

WordPress plugin CbrRate scored84%from 54 tests.

About plugin

  • Plugin page: cbrrate
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 17, 2015
  • Number of updates: 6
  • Update frequency: every 2.0 days
  • Top authors: AndreyS. (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,626 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.70ms] Passed 4 tests

A check of server-side resources used by CbrRate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0742.39 ▼3.51
Dashboard /wp-admin49.19 ▲45.809,459,841.94 ▲9,459,774.27
Posts /wp-admin/edit.php3.53 ▲0.1352.75 ▼0.33
Add New Post /wp-admin/post-new.php6.00 ▲0.0694.61 ▼11.49
Media Library /wp-admin/upload.php3.34 ▲0.0641.60 ▼15.47

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 21 new options
New WordPress options
widget_recent-comments
cbrrate_prevdate
cbrrate_EUR_1697587200
cbrrate_JPY_1697587200
db_upgraded
theysaidso_admin_options
cbrrate_CNY_1697500800
cbrrate_JPY_1697500800
widget_cbr_widget
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for CbrRate
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.37 ▼0.201.65 ▼0.3743.64 ▲0.86
Dashboard /wp-admin2,195 ▲185.60 ▲0.0393.40 ▲0.3542.39 ▼2.40
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.1136.44 ▼3.9035.34 ▼1.47
Add New Post /wp-admin/post-new.php1,528 ▲223.02 ▼0.17680.28 ▲76.6660.15 ▲2.88
Media Library /wp-admin/upload.php1,403 ▲94.18 ▼0.0795.03 ▼7.6643.22 ▼0.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 21 options in the database
    • cbrrate_USD_1697500800
    • db_upgraded
    • can_compress_scripts
    • cbrrate_BYR_1697500800
    • cbrrate_BYR_1697587200
    • widget_recent-comments
    • cbrrate_GBP_1697500800
    • widget_recent-posts
    • widget_theysaidso_widget
    • cbrrate_JPY_1697587200
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cbrrate/cbrrate.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (This screen shot screenshot-1.jpg of use widget CbrRate on same theme)
The official readme.txt is a good inspiration

cbrrate/cbrrate.php Passed 13 tests

"CbrRate" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
Виджет курса валют ЦБ РФ на текущий день c динамикой.

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
There were no executable files found in this plugin245 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12812221
CSS10024

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity7.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/dollar.png3.30KB0.35KB▼ 89.36%
img/euro.png3.24KB0.34KB▼ 89.53%