90% woo-exchange-rate

Code Review | Woo Exchange Rate

WordPress plugin Woo Exchange Rate scored90%from 54 tests.

About plugin

  • Plugin page: woo-exchange-rate
  • Plugin version: 17.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6
  • WordPress version: 6.3.1
  • First release: Sep 15, 2016
  • Latest release: Apr 23, 2017
  • Number of updates: 21
  • Update frequency: every 10.5 days
  • Top authors: pkolomeitsev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active /1,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.36ms] Passed 4 tests

An overview of server-side resources used by Woo Exchange Rate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.55 ▲0.09
Dashboard /wp-admin3.36 ▲0.0145.78 ▼22.53
Posts /wp-admin/edit.php3.47 ▲0.1148.83 ▼5.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0599.05 ▼1.89
Media Library /wp-admin/upload.php3.28 ▲0.0540.33 ▲6.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Exchange Rate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.75 ▲0.321.71 ▼0.0543.69 ▼1.07
Dashboard /wp-admin2,198 ▲185.66 ▼0.0092.93 ▼8.8847.89 ▲3.75
Posts /wp-admin/edit.php2,103 ▲62.02 ▲0.0334.95 ▼5.6235.39 ▼1.68
Add New Post /wp-admin/post-new.php1,552 ▲1223.13 ▲4.79665.83 ▲38.2652.96 ▲1.71
Media Library /wp-admin/upload.php1,403 ▲34.24 ▼0.09105.55 ▲1.5747.65 ▲3.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Looking good! No server-side errors or output on direct access of PHP files

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

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
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Woo Exchange Rate plugin settings screen), #2 (Exchange Rate Add/Edit page), #3 (Dropdown with search), #4 (Woo Exchange Rate plugin widget screen (StoreFront theme)), #5 (Frontend plugin work in action), #6 (Admin panel currency switcher)
The official readme.txt might help

woo-exchange-rate/woo-exchange-rate.php Passed 13 tests

"Woo Exchange Rate" version 17.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
44 characters long description:
Allows to add exchange rates for WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,219 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP182974621,121
PO File2202472
JavaScript13525
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.82
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods91
▷ Static methods1718.68%
▷ Public methods8189.01%
▷ Protected methods11.10%
▷ Private methods99.89%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.38MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png9.93KB4.08KB▼ 58.87%
screenshot-4.png78.71KB25.42KB▼ 67.70%
screenshot-3.png43.06KB13.08KB▼ 69.63%
screenshot-1.png77.37KB24.32KB▼ 68.57%
screenshot-5.png147.63KB42.33KB▼ 71.32%