94% woo-direct-order-gateway

Code Review | Woo Direct Order Gateway

WordPress plugin Woo Direct Order Gateway scored 94% from 54 tests.

About plugin

  • Plugin page: woo-direct-order-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8
  • WordPress version: 5.8.1
  • First release: Jun 27, 2017
  • Latest release: Jun 27, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: jomarlipon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 357 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Woo Direct Order Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0138.50 ▲5.35
Dashboard /wp-admin3.08 ▲0.0243.86 ▼4.31
Posts /wp-admin/edit.php3.13 ▲0.0243.74 ▼6.35
Add New Post /wp-admin/post-new.php5.43 ▼0.0091.89 ▼587.67
Media Library /wp-admin/upload.php3.02 ▲0.0132.57 ▼4.62

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Woo Direct Order Gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.92 ▲0.387.57 ▼1.4050.80 ▼1.35
Dashboard /wp-admin2,973 ▲395.89 ▼0.04141.68 ▼14.56125.54 ▲6.43
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0067.06 ▼5.8299.29 ▲1.04
Add New Post /wp-admin/post-new.php1,604 ▼7918.83 ▼0.04395.12 ▲2.72113.89 ▼3.12
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.05144.22 ▼22.52122.81 ▼0.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-direct-order-gateway/wc-pay-later-payment.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: payment, woocommerce

woo-direct-order-gateway/wc-pay-later-payment.php 92% from 13 tests

This is the main PHP file of "Woo Direct Order Gateway" 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-direct-order-gateway.php" instead of "wc-pay-later-payment.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
Everything looks great! No dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181038

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin