84% artiss-currency-converter

Code Review | Open Currency Converter

WordPress plugin Open Currency Converter scored 84% from 54 tests.

About plugin

  • Plugin page: artiss-currency-c...
  • Plugin version: 1.4.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2012
  • Latest release: Jul 22, 2023
  • Number of updates: 320
  • Update frequency: every 12.9 days
  • Top authors: dartiss (95.63%)codedart (4.69%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active / 30,162 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.27ms] 75% from 4 tests

A check of server-side resources used by Open Currency Converter
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 581.32ms on /wp-admin/tools.php?page=rates)
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.21 ▲3.43
Dashboard /wp-admin3.38 ▲0.0850.45 ▲7.15
Posts /wp-admin/edit.php3.43 ▲0.0747.59 ▲1.47
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.20 ▼4.31
Media Library /wp-admin/upload.php3.30 ▲0.0737.07 ▼1.66
Open Currency /wp-admin/options-general.php?page=options3.31606.87
Currency Rates /wp-admin/tools.php?page=rates3.31581.32

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 189 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
open_currency_converter
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Open Currency Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.80 ▲0.381.65 ▼0.2144.81 ▲3.74
Dashboard /wp-admin2,220 ▲355.90 ▲0.8793.82 ▼9.7139.21 ▼2.95
Posts /wp-admin/edit.php2,102 ▲132.03 ▲0.0433.93 ▼1.6133.73 ▲3.69
Add New Post /wp-admin/post-new.php1,526 ▲1217.68 ▼0.04672.59 ▲4.5855.54 ▲3.25
Media Library /wp-admin/upload.php1,405 ▲174.20 ▼0.07104.20 ▼15.8445.92 ▼3.83
Open Currency /wp-admin/options-general.php?page=options9842.0222.3027.52
Currency Rates /wp-admin/tools.php?page=rates8232.0523.3823.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • 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 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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/artiss-currency-converter/artiss-currency-converter.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/artiss-currency-converter/includes/shortcodes.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function occ_get_options() in wp-content/plugins/artiss-currency-converter/includes/rates.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/artiss-currency-converter/includes/options.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/artiss-currency-converter/includes/admin-config.php:30

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: currency, cash, convert, money, conversion

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

The main PHP file in "Open Currency Converter" ver. 1.4.6 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Convert currencies within the text of a post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin473 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10248325473

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
178 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags/dop.png0.35KB0.67KB0.00%
images/flags/imp.png0.42KB0.60KB0.00%
images/flags/rsd.png0.35KB0.58KB0.00%
images/flags/yer.png0.28KB0.58KB0.00%
images/flags/ttd.png0.45KB0.68KB0.00%