90% currency-per-product-for-woocommerce

Code Review | Currency per Product for WooCommerce

WordPress plugin Currency per Product for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: currency-per-prod...
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 22, 2017
  • Latest release: Sep 5, 2023
  • Number of updates: 43
  • Update frequency: every 51.3 days
  • Top authors: tychesoftwares (53.49%)algoritmika (48.84%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /26,691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.73ms] Passed 4 tests

Server-side resources used by Currency per Product for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.64 ▲0.14
Dashboard /wp-admin3.33 ▼0.0241.25 ▼20.05
Posts /wp-admin/edit.php3.38 ▲0.0244.44 ▼3.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.17 ▼7.34
Media Library /wp-admin/upload.php3.25 ▲0.0230.27 ▼3.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Currency per Product for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.24 ▼1.442.05 ▲0.4939.25 ▼0.73
Dashboard /wp-admin2,203 ▲125.79 ▲0.8595.55 ▼9.7439.40 ▼4.53
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0138.72 ▲0.6135.59 ▲4.50
Add New Post /wp-admin/post-new.php1,542 ▲518.19 ▼0.04598.46 ▼18.8554.57 ▲4.93
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0598.06 ▲0.2143.56 ▼1.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: currency per product, woocommerce, multicurrency, product currency

currency-per-product-for-woocommerce/currency-per-product-for-woocommerce.php Passed 13 tests

The entry point to "Currency per Product for WooCommerce" version 1.6.0 is a PHP file that has certain tags in its header comment area
72 characters long description:
Set and display prices for WooCommerce products in different currencies.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,158 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP204041,4662,908
JavaScript35222250

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity25.29
▷ Minimum class complexity1.00
▷ Maximum class complexity194.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes15.88%
Methods109
▷ Static methods1513.76%
▷ Public methods109100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.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