78% woo-pulzepay

Code Review | WooCommerce PulzePay

WordPress plugin WooCommerce PulzePay scored78%from 54 tests.

About plugin

  • Plugin page: woo-pulzepay
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Jun 13, 2017
  • Latest release: Jul 16, 2021
  • Number of updates: 17
  • Update frequency: every 88.5 days
  • Top authors: pulzepay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.99ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce PulzePay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.90 ▲6.18
Dashboard /wp-admin3.34 ▲0.0350.15 ▼6.16
Posts /wp-admin/edit.php3.39 ▲0.0347.64 ▼1.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.33 ▲6.27
Media Library /wp-admin/upload.php3.26 ▲0.0342.94 ▲5.66

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

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

Browser metrics Passed 4 tests

WooCommerce PulzePay: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▼0.011.73 ▼0.1944.35 ▲1.52
Dashboard /wp-admin2,195 ▲185.55 ▼0.1187.82 ▼8.1438.89 ▼7.01
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0135.93 ▼1.5034.57 ▼0.53
Add New Post /wp-admin/post-new.php1,526 ▼923.19 ▼0.82687.18 ▲63.5261.28 ▼3.07
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.01109.30 ▲1.0646.92 ▼4.10

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-pulzepay/payment-return.php
    • > /wp-content/plugins/woo-pulzepay/payment-callback.php
    • > /wp-content/plugins/woo-pulzepay/index.php
    • > /wp-content/plugins/woo-pulzepay/payment-result.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-pulzepay/woocommerce-pulzepay.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #3, #4 in woo-pulzepay/assets to your readme.txt
You can look at the official readme.txt

woo-pulzepay/woocommerce-pulzepay.php 92% from 13 tests

The principal PHP file in "WooCommerce PulzePay" v. 1.0.7 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-pulzepay.php" instead of "woocommerce-pulzepay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin297 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP511663297

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/pulzepay.png15.84KB4.36KB▼ 72.47%