72% simple-multi-currency-for-woocommerce

Code Review | Simple multi-currency for Woocommerce by Invelity

WordPress plugin Simple multi-currency for Woocommerce by Invelity scored 72% from 54 tests.

About plugin

  • Plugin page: simple-multi-curr...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Oct 13, 2018
  • Latest release: Apr 16, 2020
  • Number of updates: 18
  • Update frequency: every 30.7 days
  • Top authors: invelity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 851 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.81ms] Passed 4 tests

Analyzing server-side resources used by Simple multi-currency for Woocommerce by Invelity
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.48 ▼0.62
Dashboard /wp-admin3.45 ▲0.1547.40 ▼1.35
Posts /wp-admin/edit.php3.50 ▲0.1547.25 ▲0.72
Add New Post /wp-admin/post-new.php6.03 ▲0.1599.58 ▼1.98
Media Library /wp-admin/upload.php3.37 ▲0.1435.49 ▲1.32
SettingsSimple multi-currency for Woocommerce by /wp-admin/options-general.php?page=smcfw-general-settings-page3.3431.41
Payment settingsSimple multi-currency for Woocommerce by /wp-admin/admin.php?page=smcfw-setting-page3.3130.88

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 316 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_smcfw_widget
recovery_mode_email_last_sent
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Simple multi-currency for Woocommerce by Invelity
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10113.28 ▼1.015.06 ▲3.4241.89 ▲4.39
Dashboard /wp-admin2,253 ▲654.84 ▼1.0598.25 ▼13.6739.24 ▼7.68
Posts /wp-admin/edit.php2,132 ▲432.00 ▼0.0636.74 ▼2.5437.14 ▲5.30
Add New Post /wp-admin/post-new.php1,554 ▲4023.26 ▲5.58608.99 ▼0.0949.97 ▲0.55
Media Library /wp-admin/upload.php1,435 ▲504.23 ▲0.01102.66 ▼1.4544.46 ▲1.21
SettingsSimple multi-currency for Woocommerce by /wp-admin/options-general.php?page=smcfw-general-settings-page1,0202.0224.4835.03
Payment settingsSimple multi-currency for Woocommerce by /wp-admin/admin.php?page=smcfw-setting-page7161.147.3422.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_smcfw_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=smcfw-setting-page
    • > Error in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/admin/admin-fees-page.php+19
    Uncaught Error: Call to undefined function is_ajax() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/admin/admin-fees-page.php:19
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): smcfw_fees_page_func()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-multi-currency-for-woocommerce/simple-multi-currency-for-woocommerce.php
  • 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/functions/schedule.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/admin/orders-table-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_woocommerce_currency() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/reports/orders.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/admin/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/functions/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/functions/reports.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/functions/edit-product-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/functions/coupons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/admin/admin-fees-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-multi-currency-for-woocommerce/includes/functions/dashboard.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: The official readme.txt is a good inspiration

simple-multi-currency-for-woocommerce/simple-multi-currency-for-woocommerce.php 85% from 13 tests

The principal PHP file in "Simple multi-currency for Woocommerce by Invelity" v. 1.0.11 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 366 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected34,424 lines of code in 296 files:
LanguageFilesBlank linesComment linesLines of code
SVG2590217,503
JavaScript12,8812,46913,569
PHP343941793,252
PO File1292999
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity3.25
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions134
▷ Named functions12190.30%
▷ Anonymous functions139.70%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png22.64KB9.59KB▼ 57.62%