83% ezdefi-woocommerce

Code Review | ezDeFi - Bitcoin, Ethereum and Cryptocurrencies Payment Gateway for WooCommerce

WordPress plugin ezDeFi - Bitcoin, Ethereum and Cryptocurrencies Payment Gateway for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: ezdefi-woocommerce
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4.1
  • WordPress version: 5.8.1
  • First release: Jan 5, 2020
  • Latest release: May 26, 2020
  • Number of updates: 31
  • Update frequency: every 4.7 days
  • Top authors: flyforever123 (90.32%)ezdefi (12.9%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active / 9,856 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.30MB] [CPU: ▼168.37ms] Passed 4 tests

Server-side resources used by ezDeFi - Bitcoin, Ethereum and Cryptocurrencies Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.13 ▲0.2932.30 ▲4.80
Dashboard /wp-admin3.43 ▲0.3645.20 ▲2.73
Posts /wp-admin/edit.php3.47 ▲0.3533.37 ▼1.12
Add New Post /wp-admin/post-new.php5.72 ▲0.2875.62 ▼670.30
Media Library /wp-admin/upload.php3.30 ▲0.2925.57 ▼4.80

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 38 new files
Database: 1 new table, 1 new option
New tables
wp_woocommerce_ezdefi_exception
New WordPress options
woocommerce_gateway_ezdefi_version

Browser metrics Passed 4 tests

ezDeFi - Bitcoin, Ethereum and Cryptocurrencies Payment Gateway for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲4015.54 ▼0.226.20 ▼4.6276.20 ▼0.54
Dashboard /wp-admin2,933 ▲376.01 ▼0.14115.15 ▼22.07164.61 ▼6.34
Posts /wp-admin/edit.php2,740 ▼33.23 ▲0.0162.29 ▼0.91153.56 ▲11.67
Add New Post /wp-admin/post-new.php3,815 ▲8419.31 ▲0.54426.19 ▼0.30164.03 ▲2.01
Media Library /wp-admin/upload.php1,752 ▲35.53 ▼0.04142.66 ▼24.21188.24 ▼26.47

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • woocommerce_gateway_ezdefi_version

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Ezdefi_Db' not found in wp-content/plugins/ezdefi-woocommerce/includes/admin/class-wc-ezdefi-admin-notices.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% 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 your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

ezdefi-woocommerce/woocommerce-gateway-ezdefi.php 77% from 13 tests

"ezDeFi - Bitcoin, Ethereum and Cryptocurrencies Payment Gateway for WooCommerce" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ezdefi-woocommerce.php" instead of "woocommerce-gateway-ezdefi.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Plugin Name: Please shorten the plugin name (currently 79 characters long instead of max. 70)

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
No dangerous file extensions were detected3,631 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP124404451,641
JavaScript6995730
Sass41140627
CSS574622
SVG11011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity22.12
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods97
▷ Static methods33.09%
▷ Public methods8385.57%
▷ Protected methods1414.43%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/android-icon.png17.00KB8.90KB▼ 47.62%
assets/images/ios-icon.png6.26KB4.36KB▼ 30.33%
assets/images/ezdefi-icon.png13.51KB6.54KB▼ 51.56%