77% woocommerce-chilean-peso-currency

Code Review | WooCommerce Chilean Peso

WordPress plugin WooCommerce Chilean Peso scored77%from 54 tests.

About plugin

  • Plugin page: woocommerce-chile...
  • Plugin version: 2.5.12.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0 +-4.4
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Dec 16, 2015
  • Number of updates: 12
  • Update frequency: every 93.9 days
  • Top authors: ctala (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /19,411 total downloads

Benchmarks

Plugin footprint 82% 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.05MB] [CPU: ▼9.49ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Chilean Peso
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.51 ▼0.33
Dashboard /wp-admin3.37 ▲0.0247.86 ▼20.26
Posts /wp-admin/edit.php3.48 ▲0.1251.70 ▼0.01
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.86 ▼17.37
Media Library /wp-admin/upload.php3.29 ▲0.0638.24 ▲1.59
Chilean Pesos /wp-admin/options-general.php?page=my-setting-admin3.2629.92

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/woocommerce-chilean-peso-currency/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

WooCommerce Chilean Peso: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.17 ▼1.271.59 ▼0.6239.83 ▼2.52
Dashboard /wp-admin2,222 ▲215.81 ▼0.13104.78 ▼1.6939.62 ▼3.43
Posts /wp-admin/edit.php2,104 ▲42.06 ▲0.0440.09 ▼0.2135.36 ▲3.31
Add New Post /wp-admin/post-new.php1,529 ▲317.47 ▼0.17696.07 ▼4.8352.27 ▼13.23
Media Library /wp-admin/upload.php1,398 ▼54.21 ▼0.0197.94 ▼3.4341.74 ▼4.06
Chilean Pesos /wp-admin/options-general.php?page=my-setting-admin8042.0224.1626.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woocommerce-chilean-peso-currency/views/admin/viewAdmin.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocommerce-chilean-peso-currency/helpers/rowMeta.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-chilean-peso-currency/classes/MyChileanPesoSettingsPage.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-chilean-peso-currency/classes/MyChileanPesoSettingsPage.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
  • Tags: No tags were detected
You can look at the official readme.txt

woocommerce-chilean-peso-currency/woocommerce-chilean-peso.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Chilean Peso" version 2.5.12.2
The following require your attention:
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "3.0 +")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-chilean-peso-currency.php" instead of "woocommerce-chilean-peso.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected288 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP580109260
Markdown113028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected