83% openpath-payment-gateway-for-woocommerce

Code Review | OpenPath for WooCommerce

WordPress plugin OpenPath for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: openpath-payment-...
  • Plugin version: 3.8.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: May 17, 2022
  • Number of updates: 9
  • Update frequency: every 24.7 days
  • Top authors: openpathinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 474 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.27ms] Passed 4 tests

An overview of server-side resources used by OpenPath for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.75 ▼1.37
Dashboard /wp-admin3.36 ▲0.0548.43 ▼4.71
Posts /wp-admin/edit.php3.41 ▲0.0547.53 ▼7.14
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.10 ▼7.87
Media Library /wp-admin/upload.php3.28 ▲0.0535.79 ▲1.27

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

OpenPath for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.17 ▼1.265.20 ▲3.3843.04 ▲0.09
Dashboard /wp-admin2,203 ▲154.84 ▼0.04109.94 ▼4.3643.08 ▼1.72
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0239.33 ▼1.8532.43 ▼5.54
Add New Post /wp-admin/post-new.php1,514 ▼1917.56 ▼5.93691.28 ▲74.5958.29 ▲2.69
Media Library /wp-admin/upload.php1,388 ▼34.26 ▲0.05104.91 ▲7.0641.53 ▼3.06

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/openpath-payment-gateway-for-woocommerce/woocommerce_openpath.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/openpath-payment-gateway-for-woocommerce/woo-openpath-plug-in.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
8 plugin tags: e-commerce, openpath, ecommerce, payment gateway, payments...

openpath-payment-gateway-for-woocommerce/woo-openpath-plug-in.php 77% from 13 tests

The entry point to "OpenPath for WooCommerce" version 3.8.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/wp-plug-in/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("openpath-payment-gateway-for-woocommerce.php" instead of "woo-openpath-plug-in.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,196 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22601611,123
JavaScript213873

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity157.00
▷ Minimum class complexity157.00
▷ Maximum class complexity157.00
Average method complexity8.09
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1463.64%
▷ Protected methods00.00%
▷ Private methods836.36%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected