83% woo-display-your-currency

Code Review | Woo Display Additional Currency

WordPress plugin Woo Display Additional Currency scored83%from 54 tests.

About plugin

  • Plugin page: woo-display-your-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2014
  • Latest release: May 14, 2015
  • Number of updates: 8
  • Update frequency: every 32.4 days
  • Top authors: brijeshmkt (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /7,058 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.70ms] Passed 4 tests

An overview of server-side resources used by Woo Display Additional Currency
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.09 ▲3.68
Dashboard /wp-admin3.32 ▲0.0245.35 ▼0.62
Posts /wp-admin/edit.php3.38 ▲0.0242.23 ▼11.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.17 ▼0.35
Media Library /wp-admin/upload.php3.25 ▲0.0238.30 ▲1.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Woo Display Additional Currency
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.05 ▼0.612.19 ▲0.6143.78 ▲1.84
Dashboard /wp-admin2,218 ▲445.51 ▼0.1386.74 ▼9.0281.93 ▲40.62
Posts /wp-admin/edit.php2,124 ▲242.03 ▲0.0336.78 ▼5.0134.57 ▼2.99
Add New Post /wp-admin/post-new.php1,700 ▲17222.03 ▼0.76740.65 ▲71.0561.10 ▼2.46
Media Library /wp-admin/upload.php1,423 ▲234.10 ▼0.13105.24 ▼9.3274.84 ▲27.80

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-display-your-currency/woo-display-your-currency.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (25 tag instead of maximum 10)
  • Plugin Name: Please specify the plugin name on the first line ( === woo-display-your-currency === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Activate the plugin), #2 (Enter currency symbol and exchange rate), #3 (Additional currency on shop/product page), #4 (Additional currency on product details page)
You can look at the official readme.txt

woo-display-your-currency/woo-display-your-currency.php Passed 13 tests

The entry point to "Woo Display Additional Currency" version 1.0 is a PHP file that has certain tags in its header comment area
129 characters long description:
This plugin will add currency to catalog and product display page. The currency symbol and exchange rates can be set from admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1291254

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.72MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png122.00KB53.41KB▼ 56.22%
screenshot-4.png88.30KB36.22KB▼ 58.98%
images/icon.png1.94KB1.59KB▼ 17.88%
screenshot-2.png52.88KB20.85KB▼ 60.57%
screenshot-3.png472.41KB80.65KB▼ 82.93%