84% woocommerce-custom-currencies

Code Review | WooCommerce Custom Currencies

WordPress plugin WooCommerce Custom Currencies scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-custo...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Jul 23, 2013
  • Latest release: Dec 17, 2014
  • Number of updates: 42
  • Update frequency: every 12.2 days
  • Top authors: GalalAly2 (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

700+ active /37,796 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
This plugin's installer ran successfully

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

A check of server-side resources used by WooCommerce Custom Currencies
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.03 ▲4.99
Dashboard /wp-admin3.32 ▲0.0242.85 ▼3.03
Posts /wp-admin/edit.php3.37 ▲0.0144.92 ▼4.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.55 ▼3.91
Media Library /wp-admin/upload.php3.24 ▲0.0132.98 ▲1.07

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Custom Currencies
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.83 ▲0.551.78 ▼0.0543.88 ▲5.02
Dashboard /wp-admin2,206 ▲155.91 ▲0.04108.58 ▼3.3439.99 ▼2.14
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0238.46 ▼1.0234.58 ▲0.74
Add New Post /wp-admin/post-new.php1,542 ▲118.20 ▼4.91607.76 ▲14.2460.71 ▲7.27
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0597.20 ▼6.0341.75 ▼2.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WooCommerceCustomCurrencies' not found in wp-content/plugins/woocommerce-custom-currencies/templates/currency_row.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

woocommerce-custom-currencies/woocommerce-custom-currencies.php Passed 13 tests

"WooCommerce Custom Currencies" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
40 characters long description:
Adds your custom currency to woocommerce

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 plugin374 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP318185332
CSS10032
JavaScript19010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity18.50
▷ Minimum class complexity13.00
▷ Maximum class complexity24.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods313.64%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin