84% bitfinex-pay

Code Review | Bitfinex Pay

WordPress plugin Bitfinex Pay scored84%from 54 tests.

About plugin

  • Plugin page: bitfinex-pay
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2021
  • Latest release: Aug 17, 2023
  • Number of updates: 30
  • Update frequency: every 22.8 days
  • Top authors: bitfinex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,502 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.61ms] Passed 4 tests

An overview of server-side resources used by Bitfinex Pay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.86 ▲3.06
Dashboard /wp-admin3.32 ▼0.0343.78 ▼16.12
Posts /wp-admin/edit.php3.37 ▲0.0142.98 ▼1.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.09 ▼16.47
Media Library /wp-admin/upload.php3.24 ▲0.0135.89 ▲0.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bitfinex Pay
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.341.75 ▲0.1044.44 ▲6.76
Dashboard /wp-admin2,195 ▲145.54 ▼0.1980.23 ▼19.5235.37 ▼9.75
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0034.97 ▲0.9829.02 ▼9.01
Add New Post /wp-admin/post-new.php1,536 ▲823.23 ▼0.02681.34 ▲55.0353.17 ▼7.60
Media Library /wp-admin/upload.php1,400 ▲64.19 ▼0.03102.18 ▲3.9345.45 ▲3.08

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
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 49× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/psr7/src/AppendStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/bitfinex-pay/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/psr7/src/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/promises/src/FulfilledPromise.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/promises/src/AggregateException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/bitfinex-pay/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: tether payments, ethereum payments, bitcoin payments, crypto payments, cryptocurrency pay...

bitfinex-pay/bfx-pay-woocommerce.php 85% from 13 tests

The main file in "Bitfinex Pay" v. 3.0.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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bitfinex-pay.php" instead of "bfx-pay-woocommerce.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 295 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin15,724 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
PHP1202,1715,63910,643
Markdown181,45203,975
JSON13001,074
SVG20032

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.61
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes79
▷ Abstract classes00.00%
▷ Concrete classes79100.00%
▷ Final classes3544.30%
Methods766
▷ Static methods14518.93%
▷ Public methods64183.68%
▷ Protected methods101.31%
▷ Private methods11515.01%
Functions114
▷ Named functions2219.30%
▷ Anonymous functions9280.70%
Constants64
▷ Global constants00.00%
▷ Class constants64100.00%
▷ Public constants5382.81%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bfx-pay-wp-directory.png49.56KB14.86KB▼ 70.01%
assets/img/bfx-pay-white-mail.png16.98KB1.86KB▼ 89.05%