84% euro-fxref-currency-converter

Code Review | Euro FxRef Currency Converter

WordPress plugin Euro FxRef Currency Converter scored84%from 54 tests.

About plugin

  • Plugin page: euro-fxref-curren...
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2012
  • Latest release: Aug 18, 2023
  • Number of updates: 61
  • Update frequency: every 65.2 days
  • Top authors: joostdekeijzer (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /9,545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.21ms] Passed 4 tests

An overview of server-side resources used by Euro FxRef Currency Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.99 ▼6.07
Dashboard /wp-admin3.31 ▲0.0048.88 ▼1.57
Posts /wp-admin/edit.php3.36 ▲0.0051.19 ▼2.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.56 ▼4.14
Media Library /wp-admin/upload.php3.23 ▲0.0036.49 ▼4.25

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Euro FxRef Currency Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.041.88 ▲0.1342.64 ▼1.06
Dashboard /wp-admin2,189 ▲125.58 ▼0.1187.79 ▼0.5739.51 ▼7.52
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0239.54 ▼1.5435.31 ▼3.17
Add New Post /wp-admin/post-new.php1,595 ▲6917.71 ▲0.19623.79 ▼56.6158.13 ▲6.40
Media Library /wp-admin/upload.php1,391 ▼124.24 ▼0.01101.08 ▲5.1942.03 ▼2.65

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 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/euro-fxref-currency-converter/eurofxref.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
7 plugin tags: foreign exchange conversion, converter, fx rate converter, currency, ecb...

euro-fxref-currency-converter/eurofxref.php 85% from 13 tests

The principal PHP file in "Euro FxRef Currency Converter" v. 2.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 275 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("euro-fxref-currency-converter.php" instead of "eurofxref.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin264 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15066264

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.57
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods436.36%
▷ Public methods981.82%
▷ Protected methods19.09%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected