84% accept-pay-payment-gateway-for-woocommerce

Code Review | Accept Pay Payment Gateway for WooCommerce

WordPress plugin Accept Pay Payment Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: accept-pay-paymen...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2022
  • Latest release: Sep 27, 2022
  • Number of updates: 4
  • Update frequency: every 5.0 days
  • Top authors: acceptpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /178 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.43ms] Passed 4 tests

An overview of server-side resources used by Accept Pay Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.55 ▼1.06
Dashboard /wp-admin3.31 ▼0.0452.79 ▼11.60
Posts /wp-admin/edit.php3.36 ▲0.0051.11 ▼0.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.60 ▼9.04
Media Library /wp-admin/upload.php3.23 ▲0.0036.29 ▲0.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Accept Pay Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.021.94 ▲0.2944.61 ▼1.29
Dashboard /wp-admin2,198 ▲215.55 ▼0.1589.70 ▲2.3640.35 ▼0.88
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0039.71 ▼0.5237.45 ▼2.23
Add New Post /wp-admin/post-new.php1,531 ▼422.59 ▲4.26640.51 ▲7.9452.02 ▼16.06
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.0799.26 ▼4.5943.64 ▼2.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accept-pay-payment-gateway-for-woocommerce/accept-pay-payment-gateway-for-woocommerce.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
7 plugin tags: payment gateway, ecommerce, wordpress, woocommerce, sagepay go...

accept-pay-payment-gateway-for-woocommerce/accept-pay-payment-gateway-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Accept Pay Payment Gateway for WooCommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/lang/")

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 plugin388 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111869388

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/accept-pay.png3.47KB1.81KB▼ 47.88%
icon-128x128.png6.23KB3.52KB▼ 43.51%