94% pay-with-ether

Code Review | Pay With Ether for WooCommerce

WordPress plugin Pay With Ether for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: pay-with-ether
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Mar 15, 2017
  • Latest release: Jan 24, 2022
  • Number of updates: 50
  • Update frequency: every 35.4 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 6,532 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Pay With Ether for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0456.25 ▲4.23
Dashboard /wp-admin3.44 ▲0.0433.60 ▲0.60
Posts /wp-admin/edit.php3.68 ▲0.0442.24 ▲5.49
Add New Post /wp-admin/post-new.php6.91 ▼0.0693.19 ▼1,188.19
Media Library /wp-admin/upload.php3.33 ▲0.0324.19 ▲0.46

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Pay With Ether for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲7715.93 ▲0.266.33 ▲0.532.32 ▼0.13
Dashboard /wp-admin2,892 ▲316.17 ▲0.01120.07 ▼20.16157.25 ▼9.46
Posts /wp-admin/edit.php2,685 ▼33.25 ▲0.0262.28 ▼5.39134.05 ▼14.36
Add New Post /wp-admin/post-new.php1,661 ▼016.46 ▲0.40421.95 ▼1.11153.06 ▼13.21
Media Library /wp-admin/upload.php1,698 ▲35.51 ▼0.01138.60 ▲1.86187.83 ▲4.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pay-with-ether/src/gateway.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/pay-with-ether/pay-with-ether.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/pay-with-ether/src/paymentreceivedemail.php:10

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: crypto, woocommerce, ether, payment, e-commerce...

pay-with-ether/pay-with-ether.php 92% from 13 tests

The primary PHP file in "Pay With Ether for WooCommerce" version 1.4.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "4.4")

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
There were no executable files found in this plugin2,015 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON2001,035
PHP12150421901
JavaScript57570
CSS1009

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.25
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods3874.51%
▷ Protected methods00.00%
▷ Private methods1325.49%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/metamask.png1.20KB1.25KB0.00%
img/etherium-icon.png2.09KB1.57KB▼ 24.85%
img/1_pay_mm_off.png25.77KB11.17KB▼ 56.67%
img/1_pay_mm_over.png26.63KB11.88KB▼ 55.39%