84% wc-multi-currency-lite

Code Review | Multi Currency Lite For WooCommerce

WordPress plugin Multi Currency Lite For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-multi-currency...
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Oct 18, 2018
  • Latest release: Jul 30, 2022
  • Number of updates: 3
  • Update frequency: every 460.7 days
  • Top authors: jodhavishalsingh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /807 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.10MB] [CPU: ▼1.74ms] Passed 4 tests

A check of server-side resources used by Multi Currency Lite For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.78 ▲0.77
Dashboard /wp-admin3.40 ▲0.1044.15 ▼4.20
Posts /wp-admin/edit.php3.52 ▲0.1649.83 ▼2.34
Add New Post /wp-admin/post-new.php5.98 ▲0.1096.85 ▲9.99
Media Library /wp-admin/upload.php3.32 ▲0.1035.98 ▼1.19

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Multi Currency Lite For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.63 ▼0.731.89 ▲0.0841.07 ▼5.48
Dashboard /wp-admin2,203 ▲125.84 ▲0.9794.96 ▼17.7139.55 ▼5.07
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0240.76 ▲5.1438.26 ▲3.12
Add New Post /wp-admin/post-new.php1,514 ▼1917.83 ▼5.26620.77 ▼52.2741.98 ▼19.87
Media Library /wp-admin/upload.php1,385 ▼04.22 ▲0.0297.37 ▼5.0042.32 ▼0.89

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-multi-currency-lite/includes/menu.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-multi-currency-lite/includes/body.php:3

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce currencies, woocommerce currency switcher, woocommerce multi currency

wc-multi-currency-lite/wc-currency-lite.php 85% from 13 tests

Analyzing the main PHP file in "Multi Currency Lite For WooCommerce" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-multi-currency-lite.php" instead of "wc-currency-lite.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,368 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript497111634
PHP45315586
CSS3191141
SVG1017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity105.00
▷ Minimum class complexity105.00
▷ Maximum class complexity105.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected