83% arrow-one-click-checkout

Code Review | Arrow - #1 Checkout for Online Businesses in Southeast Asia

WordPress plugin Arrow - #1 Checkout for Online Businesses in Southeast Asia scored83%from 54 tests.

About plugin

  • Plugin page: arrow-one-click-c...
  • Plugin version: 1.4.29.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Jan 19, 2022
  • Latest release: Dec 23, 2022
  • Number of updates: 46
  • Update frequency: every 8.6 days
  • Top authors: muhammadarrow (67.39%)projectarrowankesh (34.78%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,863 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Arrow - #1 Checkout for Online Businesses in Southeast Asia
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.02 ▼8.30
Dashboard /wp-admin3.30 ▲0.0045.53 ▼3.46
Posts /wp-admin/edit.php3.36 ▲0.0047.75 ▼2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.25 ▲3.52
Media Library /wp-admin/upload.php3.23 ▲0.0036.58 ▲1.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Arrow - #1 Checkout for Online Businesses in Southeast Asia
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼0.971.68 ▼0.0940.23 ▼3.29
Dashboard /wp-admin2,206 ▲155.90 ▲0.8398.74 ▼8.6841.91 ▼0.32
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0339.09 ▲1.4337.85 ▲5.25
Add New Post /wp-admin/post-new.php1,546 ▲3218.48 ▲1.01657.07 ▼33.1669.83 ▲10.20
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.05102.39 ▼8.6543.44 ▼3.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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
Everything seems fine, however 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
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/arrow-one-click-checkout/templates/place-order-express.php:14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/arrow-one-click-checkout/templates/place-order-standard-checkout.php on line 4
    • > PHP Notice
      Undefined variable: lisAllPaymentArr in wp-content/plugins/arrow-one-click-checkout/templates/place-order-express-cart.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/arrow-one-click-checkout/arrow.php:4
    • > PHP Notice
      Undefined variable: lisAllPaymentArr in wp-content/plugins/arrow-one-click-checkout/templates/place-order-standard-checkout.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/arrow-one-click-checkout/templates/place-order-express-cart.php:13
    • > PHP Notice
      Undefined variable: lisAllPaymentArr in wp-content/plugins/arrow-one-click-checkout/templates/place-order-express-sku.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/arrow-one-click-checkout/templates/place-order-standard-checkout.php:13
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/arrow-one-click-checkout/templates/place-order-express.php on line 4
    • > PHP Notice
      Undefined variable: lisAllPaymentArr in wp-content/plugins/arrow-one-click-checkout/templates/place-order-express.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Backend configurations.), #2 (Quick checkout buton), #3 (Quick Checkout Form)
The official readme.txt is a good inspiration

arrow-one-click-checkout/ArrowCheckout.php 85% from 13 tests

Analyzing the main PHP file in "Arrow - #1 Checkout for Online Businesses in Southeast Asia" version 1.4.29.8
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "5.3")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("arrow-one-click-checkout.php" instead of "ArrowCheckout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,674 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP145689542,767
JavaScript98842804
Sass190102
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity26.71
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods82
▷ Static methods11.22%
▷ Public methods6275.61%
▷ Protected methods00.00%
▷ Private methods2024.39%
Functions61
▷ Named functions5488.52%
▷ Anonymous functions711.48%
Constants2
▷ Global constants2100.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
20 PNG files occupy 0.35MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/master.png2.13KB1.80KB▼ 15.48%
assets/images/mastercard.png51.12KB23.19KB▼ 54.63%
assets/images/jcb.png2.19KB1.79KB▼ 17.95%
assets/images/methods/amex.png15.86KB2.92KB▼ 81.57%
assets/icon-128x128.png8.94KB3.10KB▼ 65.29%