78% multiple-currency-switcher-for-woocommerce

Code Review | Multiple Currency Switcher for WooCommerce

WordPress plugin Multiple Currency Switcher for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: multiple-currency...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 29, 2022
  • Latest release: Oct 11, 2023
  • Number of updates: 62
  • Update frequency: every 5.2 days
  • Top authors: hashtechy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /527 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 gracefully, with no errors

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

A check of server-side resources used by Multiple Currency Switcher for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.07 ▲3.27
Dashboard /wp-admin3.31 ▲0.0049.27 ▼4.32
Posts /wp-admin/edit.php3.36 ▲0.0050.18 ▲3.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.16 ▼18.82
Media Library /wp-admin/upload.php3.23 ▲0.0039.66 ▲2.05

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

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

Browser metrics Passed 4 tests

Multiple Currency Switcher for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.341.61 ▼0.1539.99 ▼1.69
Dashboard /wp-admin2,198 ▲245.61 ▼0.0490.37 ▼0.7338.31 ▼6.76
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0139.40 ▲2.3937.23 ▲2.37
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▲0.11657.26 ▲27.1555.12 ▼11.57
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.05105.99 ▼1.8548.36 ▲2.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/multiple-currency-switcher-for-woocommerce/public/partials/multiple-currency-switcher-for-woocommerce-public-display.php
  • 1× 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/multiple-currency-switcher-for-woocommerce/admin/class-multiple-currency-switcher-for-woocommerce-admin.php:25

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
No tags were detected

multiple-currency-switcher-for-woocommerce/multiple-currency-switcher-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Multiple Currency Switcher for WooCommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,305 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP11230581713
CSS37628355
JavaScript34913178
Markdown133059

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.75
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin