84% beyond-pay-for-woocommerce

Code Review | Beyond Pay for WooCommerce

WordPress plugin Beyond Pay for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: beyond-pay-for-wo...
  • Plugin version: 1.7.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2020
  • Latest release: Nov 22, 2023
  • Number of updates: 42
  • Update frequency: every 25.8 days
  • Top authors: beyondpay (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,468 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
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.21ms] Passed 4 tests

This is a short check of server-side resources used by Beyond Pay for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.96 ▼1.69
Dashboard /wp-admin3.52 ▲0.1752.12 ▼12.83
Posts /wp-admin/edit.php3.57 ▲0.2150.23 ▼2.96
Add New Post /wp-admin/post-new.php6.06 ▲0.1790.40 ▼3.36
Media Library /wp-admin/upload.php3.38 ▲0.1536.41 ▲2.89

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Beyond Pay for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5514.20 ▼0.501.68 ▲0.0544.23 ▲2.29
Dashboard /wp-admin2,210 ▲305.62 ▲0.0095.13 ▲5.9843.37 ▲3.03
Posts /wp-admin/edit.php2,112 ▲122.02 ▲0.0640.04 ▲2.3137.26 ▲6.87
Add New Post /wp-admin/post-new.php1,538 ▲1223.82 ▲0.72692.43 ▲21.8751.82 ▼1.79
Media Library /wp-admin/upload.php1,409 ▲64.17 ▼0.0196.69 ▼3.9140.97 ▼1.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× 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/beyond-pay-for-woocommerce/includes/wc-beyond-pay-gateway.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/beyond-pay-for-woocommerce/beyondpay-gateway.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: recurring billing, subscription payments, subscriptions, payment, credit card...

beyond-pay-for-woocommerce/beyondpay-gateway.php 92% from 13 tests

"Beyond Pay for WooCommerce" version 1.7.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("beyond-pay-for-woocommerce.php" instead of "beyondpay-gateway.php")

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
Success! There were no dangerous files found in this plugin2,575 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP35572342,151
JavaScript41810218
Markdown1580142
CSS20064

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.83
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods54
▷ Static methods1527.78%
▷ Public methods3972.22%
▷ Protected methods00.00%
▷ Private methods1527.78%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.26MB with 0.18MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png80.20KB25.79KB▼ 67.84%
assets/screenshot-2.png89.64KB29.53KB▼ 67.06%
assets/screenshot-1.png101.22KB33.06KB▼ 67.34%