84% woo-paypal-currency-changer

Code Review | WooCommerce PayPal Currency Changer

WordPress plugin WooCommerce PayPal Currency Changer scored84%from 54 tests.

About plugin

  • Plugin page: woo-paypal-curren...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2018
  • Latest release: Jan 22, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: mcwebdesignro (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,067 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.78ms] Passed 4 tests

An overview of server-side resources used by WooCommerce PayPal Currency Changer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.91 ▼5.85
Dashboard /wp-admin3.34 ▼0.0053.62 ▼13.45
Posts /wp-admin/edit.php3.39 ▲0.0451.17 ▼3.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.88 ▲3.90
Media Library /wp-admin/upload.php3.27 ▲0.0441.17 ▲3.27

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce PayPal Currency Changer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.121.92 ▼0.1843.84 ▼0.70
Dashboard /wp-admin2,195 ▲185.62 ▲0.0491.80 ▲2.1340.74 ▲1.24
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0339.35 ▼0.0335.96 ▲0.06
Add New Post /wp-admin/post-new.php1,526 ▼023.45 ▼0.17688.43 ▲38.4265.75 ▲9.05
Media Library /wp-admin/upload.php1,403 ▲94.16 ▼0.0797.25 ▼0.3344.85 ▲0.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-paypal-currency-changer/woocommerce-paypal-currency-changer.php:196

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: paypal currency, currency changer, currency converter, unsupported currency

woo-paypal-currency-changer/woocommerce-paypal-currency-changer.php 85% from 13 tests

The main file in "WooCommerce PayPal Currency Changer" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-paypal-currency-changer.php" instead of "woocommerce-paypal-currency-changer.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
Everything looks great! No dangerous files found in this plugin214 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14226185
JavaScript13329

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin