83% russian-currency-chart

Code Review | Russian Currency Chart

WordPress plugin Russian Currency Chart scored83%from 54 tests.

About plugin

  • Plugin page: russian-currency-...
  • Plugin version: 0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9
  • WordPress version: 6.3.1
  • First release: Jul 28, 2018
  • Latest release: Aug 1, 2018
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: artbelov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /644 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.14ms] Passed 4 tests

Server-side resources used by Russian Currency Chart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.93 ▼0.63
Dashboard /wp-admin3.36 ▲0.0653.48 ▲2.22
Posts /wp-admin/edit.php3.41 ▲0.0547.26 ▲2.01
Add New Post /wp-admin/post-new.php5.94 ▲0.05107.02 ▲2.17
Media Library /wp-admin/upload.php3.28 ▲0.0535.81 ▲1.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
rucurrency_chart_data
widget_ru_currency_chart
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Russian Currency Chart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.12 ▼0.329.95 ▲7.9942.02 ▼0.25
Dashboard /wp-admin2,206 ▲185.83 ▼0.0699.91 ▼3.1939.97 ▲1.65
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.1035.88 ▼5.7932.52 ▼7.17
Add New Post /wp-admin/post-new.php1,542 ▲1418.53 ▲0.21602.31 ▼11.5351.25 ▼7.31
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0196.54 ▼2.2042.29 ▼3.16

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_ru_currency_chart
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/russian-currency-chart/rucurrency.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === russian-currency-chart === )
You can look at the official readme.txt

russian-currency-chart/rucurrency.php 85% from 13 tests

Analyzing the main PHP file in "Russian Currency Chart" version 0.6
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("russian-currency-chart.php" instead of "rucurrency.php")

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
There were no executable files found in this plugin324 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP14811158
JavaScript2209101
PO File1101939
CSS15023
SVG30123

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected