10% woo-payment-per-products

Code Review | Woocommerce Payment Per Products

WordPress plugin Woocommerce Payment Per Products scored 10% from 54 tests.

About plugin

  • Plugin page: woo-payment-per-p...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.3.2
  • WordPress version: 5.8.1
  • First release: Nov 23, 2018
  • Latest release: Jan 27, 2020
  • Number of updates: 4
  • Update frequency: every 107.8 days
  • Top authors: indianbusybees (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 316 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'woopp_plugin_activate' not found or invalid function name

Server metrics [RAM: ▲0.02MB] [CPU: ▼143.52ms] Passed 4 tests

A check of server-side resources used by Woocommerce Payment Per Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1341.24 ▲13.75
Dashboard /wp-admin3.08 ▲0.0248.99 ▼0.45
Posts /wp-admin/edit.php3.13 ▲0.0247.62 ▼1.81
Add New Post /wp-admin/post-new.php5.44 ▲0.0091.67 ▼574.92
Media Library /wp-admin/upload.php3.02 ▲0.0238.85 ▲3.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Payment Per Products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.96 ▲0.259.94 ▼0.5449.05 ▼1.01
Dashboard /wp-admin2,967 ▲366.05 ▼0.03148.13 ▼21.65125.58 ▲5.15
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0072.05 ▲7.6091.81 ▼0.16
Add New Post /wp-admin/post-new.php1,615 ▼6821.36 ▲3.01342.00 ▼77.46108.03 ▲0.40
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.02172.22 ▲2.57124.09 ▲0.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woo-payment-per-products/woo-pay-per-pro.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: products, woocommerce, payment

woo-payment-per-products/woo-pay-per-pro.php 92% from 13 tests

This is the main PHP file of "Woocommerce Payment Per Products" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-payment-per-products.php" instead of "woo-pay-per-pro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin82 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1123382

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin