73% premmerce-woocommerce-multi-currency

Code Review | Premmerce Multi-currency for Woocommerce

WordPress plugin Premmerce Multi-currency for Woocommerce scored73%from 54 tests.

About plugin

  • Plugin page: premmerce-woocomm...
  • Plugin version: 2.3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 25
  • Update frequency: every 68.8 days
  • Top authors: premmerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /13,701 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▲0.56ms] Passed 4 tests

An overview of server-side resources used by Premmerce Multi-currency for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5942.48 ▼2.07
Dashboard /wp-admin3.89 ▲0.5954.58 ▲2.04
Posts /wp-admin/edit.php3.95 ▲0.5953.60 ▲0.54
Add New Post /wp-admin/post-new.php6.41 ▲0.5397.19 ▲1.74
Media Library /wp-admin/upload.php3.66 ▲0.4341.30 ▲2.16
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0238.85

Server storage [IO: ▲3.43MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 237 new files
Database: 1 new table, 11 new options
New tables
wp_premmerce_currencies
New WordPress options
can_compress_scripts
fs_active_plugins
db_upgraded
theysaidso_admin_options
premmerce_multicurrency_db_version
fs_accounts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
premmerce_main_currency
...

Browser metrics Passed 4 tests

An overview of browser requirements for Premmerce Multi-currency for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.26 ▼0.471.61 ▼0.0132.54 ▼11.01
Dashboard /wp-admin2,224 ▲465.51 ▼0.1290.59 ▼22.4341.81 ▼0.00
Posts /wp-admin/edit.php2,132 ▲322.09 ▲0.0737.94 ▼4.5438.96 ▲0.70
Add New Post /wp-admin/post-new.php1,552 ▲1723.26 ▲5.02633.95 ▼2.7459.83 ▼6.02
Media Library /wp-admin/upload.php1,426 ▲294.20 ▲0.0299.34 ▼6.1446.94 ▲1.19
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0821.6722.8729.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/premmerce-woocommerce-multi-currency/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_active_plugins
    • fs_accounts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • fs_debug_mode

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Premmerce\\SDK\\V2\\Plugin\\PluginInterface' not found in wp-content/plugins/premmerce-woocommerce-multi-currency/src/WoocommerceMulticurrencyPlugin.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/premmerce-woocommerce-multi-currency/src/Admin/CurrenciesListTable.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/premmerce-woocommerce-multi-currency/src/Admin/UpdatersListTable.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/premmerce-woocommerce-multi-currency/src/Widget/CurrenciesWidget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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 to be fixed: Please take inspiration from this readme.txt

premmerce-woocommerce-multi-currency/premmerce-woocommerce-multicurrency.php 77% from 13 tests

Analyzing the main PHP file in "Premmerce Multi-currency for Woocommerce" version 2.3.5
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("premmerce-woocommerce-multi-currency.php" instead of "premmerce-woocommerce-multicurrency.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin38,781 lines of code in 189 files:
LanguageFilesBlank linesComment linesLines of code
PHP1639,13019,29137,222
PO File2371612696
JavaScript615468680
Markdown153070
JSON20064
CSS158049

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity65.41
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces19
Interfaces2
Traits0
Classes74
▷ Abstract classes22.70%
▷ Concrete classes7297.30%
▷ Final classes00.00%
Methods1,535
▷ Static methods21814.20%
▷ Public methods1,09271.14%
▷ Protected methods171.11%
▷ Private methods42627.75%
Functions134
▷ Named functions10074.63%
▷ Anonymous functions3425.37%
Constants168
▷ Global constants9858.33%
▷ Class constants7041.67%
▷ Public constants70100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%