10% currency-converter

Code Review | Currency Converter

WordPress plugin Currency Converter scored10%from 54 tests.

About plugin

  • Plugin page: currency-converter
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 23, 2010
  • Latest release: May 16, 2023
  • Number of updates: 93
  • Update frequency: every 51.9 days
  • Top authors: enclick (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /55,315 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/currency-converter/currency-converter.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; currency_converter has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼59.05ms] Passed 4 tests

This is a short check of server-side resources used by Currency Converter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.305.38 ▼37.55
Dashboard /wp-admin2.19 ▼1.166.30 ▼59.27
Posts /wp-admin/edit.php2.19 ▼1.176.99 ▼41.60
Add New Post /wp-admin/post-new.php2.19 ▼3.706.26 ▼97.78
Media Library /wp-admin/upload.php2.19 ▼1.046.08 ▼33.14

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 262 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_currency_converter

Browser metrics Passed 4 tests

This is an overview of browser requirements for Currency Converter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.70 ▲0.341.76 ▼0.1950.43 ▲6.09
Dashboard /wp-admin2,192 ▲185.62 ▲0.1095.21 ▼6.7143.47 ▼1.56
Posts /wp-admin/edit.php2,097 ▼01.97 ▲0.0038.11 ▲0.3034.71 ▼1.88
Add New Post /wp-admin/post-new.php1,526 ▼123.20 ▲2.17649.42 ▼58.5554.24 ▼1.61
Media Library /wp-admin/upload.php1,400 ▼34.21 ▲0.0198.58 ▼4.8440.89 ▼4.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/currency-converter/currency-converter.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; currency_converter has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_currency_converter
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/currency-converter/currency-converter.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Generic currency calculator - vertical layout), #2 (Generic currency calculator - horizontal layout and green colour selection), #3 (GB Sterling Pound currency calculator - vertical layout and blue colour selection), #4 (Generic currency calculator - compact vertical layout and gold colour selection), #5 (US Dollar currency calculator - horizontal layout and gold colour selection), #6 (Admin panel), #7 (US Dollar currency calculator - horizontal layout and dark blue colour selection)
Please take inspiration from this readme.txt

currency-converter/currency-converter.php Passed 13 tests

The principal PHP file in "Currency Converter" v. 2.3.1 is loaded by WordPress automatically on each request
122 characters long description:
Currency Converter for any currency in the world. Allows selection of colors, size, layout, default currencies and values.

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

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
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
251 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
countries/eth.png0.32KB0.31KB▼ 5.14%
countries/tw.png0.45KB0.63KB0.00%
countries/mx.png0.56KB0.71KB0.00%
countries/mo.png0.57KB0.71KB0.00%
countries/pt.png0.54KB0.68KB0.00%