83% custom-currency-for-woocommerce

Code Review | Custom Currency for WooCommerce

WordPress plugin Custom Currency for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: custom-currency-f...
  • Plugin version: 7.2.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.0
  • WordPress version: 6.3.1
  • First release: Sep 11, 2020
  • Latest release: Jan 4, 2023
  • Number of updates: 35
  • Update frequency: every 24.2 days
  • Top authors: iamprogrammerlk (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /15,384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.53ms] Passed 4 tests

This is a short check of server-side resources used by Custom Currency for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.87 ▼4.02
Dashboard /wp-admin3.44 ▲0.0947.12 ▼17.67
Posts /wp-admin/edit.php3.55 ▲0.2051.49 ▲3.25
Add New Post /wp-admin/post-new.php6.02 ▲0.1397.96 ▼1.71
Media Library /wp-admin/upload.php3.36 ▲0.1336.80 ▲1.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Currency for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.58 ▼0.791.65 ▼0.1643.97 ▲1.81
Dashboard /wp-admin2,221 ▲335.84 ▲0.97104.83 ▼13.1142.98 ▼5.20
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0740.29 ▲4.8435.46 ▼1.72
Add New Post /wp-admin/post-new.php1,529 ▼417.61 ▼5.64617.40 ▼65.7761.54 ▲8.80
Media Library /wp-admin/upload.php1,397 ▲64.22 ▼0.1497.39 ▼13.7042.72 ▼6.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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 | 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
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/custom-currency-for-woocommerce/Private/PluginActivator/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Private/PluginOptions/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/vendor/composer/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Public/Assets/StyleSheets/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Common/Languages/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Public/Assets/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Public/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Public/Assets/Images/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Private/Wordpress/index.php
    • > /wp-content/plugins/custom-currency-for-woocommerce/Public/Assets/JavaScripts/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: woocommerce, currency

custom-currency-for-woocommerce/custom-currency-for-woocommerce.php 77% from 13 tests

The main PHP script in "Custom Currency for WooCommerce" version 7.2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/Public/Languages")

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
There were no executable files found in this plugin909 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP17195257891
JSON12018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity9.89
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods49
▷ Static methods48.16%
▷ Public methods4795.92%
▷ Protected methods00.00%
▷ Private methods24.08%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin