89% bitpay-quickpay

Code Review | BitPay QuickPay

WordPress plugin BitPay QuickPay scored89%from 54 tests.

About plugin

  • Plugin page: bitpay-quickpay
  • Plugin version: 1.1.1910
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.4
  • WordPress version: 6.3.1
  • First release: Mar 30, 2019
  • Latest release: Oct 14, 2019
  • Number of updates: 10
  • Update frequency: every 19.9 days
  • Top authors: bitpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.72MB] [CPU: ▼22.51ms] Passed 4 tests

An overview of server-side resources used by BitPay QuickPay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.42 ▲2.88
Dashboard /wp-admin3.21 ▼0.0930.34 ▼20.81
Posts /wp-admin/edit.php3.28 ▼0.0835.70 ▼8.80
Add New Post /wp-admin/post-new.php3.20 ▼2.6934.23 ▼54.31
Media Library /wp-admin/upload.php3.22 ▼0.0128.85 ▼6.12

Server storage [IO: ▲3.98MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 12 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
bitpayquickpay_option_dev_token
bitpayquickpay_option_message
db_upgraded
bitpayquickpay_option_endpoint
can_compress_scripts
bitpayquickpay_option_default_amount
bitpayquickpay_option_prod_token
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by BitPay QuickPay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲14513.26 ▼1.115.62 ▲3.9647.39 ▲4.47
Dashboard /wp-admin2,224 ▲425.90 ▲1.01105.32 ▲5.2541.25 ▼1.43
Posts /wp-admin/edit.php2,107 ▲182.00 ▼0.0241.06 ▲6.2051.38 ▲15.79
Add New Post /wp-admin/post-new.php1,543 ▲123.21 ▲5.05657.04 ▲13.0653.66 ▲2.44
Media Library /wp-admin/upload.php1,406 ▲214.28 ▲0.0194.87 ▲0.0940.55 ▼2.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • bitpayquickpay_option_endpoint
    • widget_theysaidso_widget
    • db_upgraded
    • bitpayquickpay_option_default_amount
    • bitpayquickpay_option_message
    • bitpayquickpay_option_dev_token
    • bitpayquickpay_option_currency
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
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
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: bitcoin, bitpay, cryptocurrency, bitcoin cash, payment gateway...

bitpay-quickpay/index.php 92% from 13 tests

"BitPay QuickPay" version 1.1.1910'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 ("bitpay-quickpay.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin710 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP712522528
JavaScript2433145
Markdown122025
CSS13012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.60
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 3.94MB with 2.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png53.83KB14.29KB▼ 73.45%
assets/screenshot-1.png298.82KB94.03KB▼ 68.53%
assets/screenshot-8.png657.68KB285.96KB▼ 56.52%
assets/screenshot-2.png310.49KB93.48KB▼ 69.89%
assets/screenshot-3.png442.71KB116.44KB▼ 73.70%