83% wc-multi-currency

Code Review | Multi Currency For WooCommerce

WordPress plugin Multi Currency For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-multi-currency
  • Plugin version: 1.5.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2019
  • Latest release: Apr 11, 2023
  • Number of updates: 61
  • Update frequency: every 20.7 days
  • Top authors: sarwarcse (85.25%)palscode (16.39%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /28,560 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 gracefully, with no errors

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

Server-side resources used by Multi Currency For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.76 ▼3.73
Dashboard /wp-admin3.31 ▲0.0143.70 ▼6.91
Posts /wp-admin/edit.php3.36 ▲0.0046.87 ▼1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.91 ▼14.08
Media Library /wp-admin/upload.php3.24 ▲0.0035.90 ▲1.05

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 548 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Currency For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.29 ▼1.161.78 ▼0.0140.94 ▼6.55
Dashboard /wp-admin2,214 ▲264.83 ▼1.05108.52 ▼3.3042.69 ▼2.41
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0039.23 ▲4.6836.53 ▼0.34
Add New Post /wp-admin/post-new.php1,542 ▼023.09 ▲4.81679.13 ▲68.1661.13 ▲9.91
Media Library /wp-admin/upload.php1,390 ▲84.24 ▲0.0797.23 ▼2.1639.74 ▼2.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • 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 | 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
The following issues need your attention
  • 30× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AppsBDLiteModule' not found in wp-content/plugins/wc-multi-currency/modules/APBDWMC_instruction.php:8
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wc-multi-currency/wcmilticurrency.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-multi-currency/template/popup.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-multi-currency/views/apbdwmc_instruction/main.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AppsBDLiteModule' not found in wp-content/plugins/wc-multi-currency/modules/APBDWMC_advance.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-multi-currency/views/apbdwmc_general/main.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-multi-currency/views/apbdwmc_design/default_currency_chooser.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-multi-currency/views/apbdwmc_payment_currency/main.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wc-multi-currency/views/apbdwmc_recommended/main.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-multi-currency/wcmilticurrency.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

wc-multi-currency/wcmilticurrency.php 77% from 13 tests

Analyzing the main PHP file in "Multi Currency For WooCommerce" version 1.5.5
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 364 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-multi-currency.php" instead of "wcmilticurrency.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "3.3")

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
Good job! No executable or dangerous file extensions detected57,035 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript966,5365,43727,695
CSS3026918314,467
PHP419237896,970
JSON3004,730
SVG6002,849
PO File1980209
Sass4170113
LESS1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity32.89
▷ Minimum class complexity1.00
▷ Maximum class complexity363.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods483
▷ Static methods489.94%
▷ Public methods45193.37%
▷ Protected methods214.35%
▷ Private methods112.28%
Functions74
▷ Named functions7195.95%
▷ Anonymous functions34.05%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
341 PNG files occupy 0.87MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags/square/CLF.png1.41KB0.51KB▼ 63.62%
images/flags/circle/TOP.png2.10KB1.65KB▼ 21.62%
images/flags/country_flags/northern-marianas-islands.png2.91KB2.23KB▼ 23.15%
images/flags/square/IQD.png1.18KB0.33KB▼ 72.09%
images/flags/circle/FKP.png3.79KB2.31KB▼ 39.09%