94% litepay

Code Review | LITEPAY Bitcoin Merchant plugin for WordPress WooCommerce

WordPress plugin LITEPAY Bitcoin Merchant plugin for WordPress WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: litepay
  • Plugin version: 0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.6
  • WordPress version: 5.8.1
  • First release: Oct 16, 2018
  • Latest release: Dec 28, 2020
  • Number of updates: 16
  • Update frequency: every 50.3 days
  • Top authors: litepay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 440 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.00MB] [CPU: ▼140.66ms] Passed 4 tests

Server-side resources used by LITEPAY Bitcoin Merchant plugin for WordPress WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.82 ▲14.96
Dashboard /wp-admin3.06 ▲0.0145.59 ▲1.10
Posts /wp-admin/edit.php3.11 ▲0.0142.71 ▼1.00
Add New Post /wp-admin/post-new.php5.42 ▼0.0185.90 ▼560.73
Media Library /wp-admin/upload.php3.00 ▲0.0030.65 ▼1.99

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by LITEPAY Bitcoin Merchant plugin for WordPress WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.98 ▲0.538.76 ▼0.8442.26 ▼7.23
Dashboard /wp-admin2,973 ▲425.92 ▼0.31132.05 ▼6.84109.71 ▼7.45
Posts /wp-admin/edit.php2,739 ▲32.70 ▲0.0064.02 ▼1.6587.31 ▲2.74
Add New Post /wp-admin/post-new.php1,872 ▲26819.19 ▲0.36373.87 ▲14.1899.89 ▼3.65
Media Library /wp-admin/upload.php1,807 ▼35.02 ▲0.00156.79 ▲3.79116.37 ▲0.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/litepay/litepay.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in litepay/assets to your readme.txt
The official readme.txt is a good inspiration

litepay/litepay.php Passed 13 tests

The main file in "LITEPAY Bitcoin Merchant plugin for WordPress WooCommerce" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
116 characters long description:
This module integrates LitePay Merchant API with Wordpress's Woocommerce plugin to accept Bitcoin/Litecoin payments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin334 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP564100334

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/litepay.png4.18KB3.27KB▼ 21.71%