89% pnp-pick-and-pay-payment-gateway

Code Review | PnP (Pick and Pay) Payment Gateway For Woocommerce

WordPress plugin PnP (Pick and Pay) Payment Gateway For Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: pnp-pick-and-pay-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2022
  • Latest release: Oct 7, 2022
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: rashedulhaquerumi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /155 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.95ms] Passed 4 tests

A check of server-side resources used by PnP (Pick and Pay) Payment Gateway For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.86 ▲3.46
Dashboard /wp-admin3.31 ▲0.0051.01 ▼1.72
Posts /wp-admin/edit.php3.36 ▲0.0044.74 ▼5.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.72 ▼16.37
Media Library /wp-admin/upload.php3.23 ▲0.0035.55 ▼3.76

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by PnP (Pick and Pay) Payment Gateway For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.74 ▲0.381.92 ▼0.0343.95 ▼1.25
Dashboard /wp-admin2,195 ▲185.61 ▼0.0490.38 ▼4.2237.59 ▼5.67
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0235.82 ▲0.2634.48 ▼1.41
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▲0.24631.56 ▼33.9649.74 ▼5.49
Media Library /wp-admin/upload.php1,397 ▼64.19 ▲0.0297.63 ▼0.8648.73 ▲1.25

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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 to be fixed:
  • Screenshots: Please add an image for screenshot #1 (PnP Payment Gateway)
You can take inspiration from this readme.txt

pnp-pick-and-pay-payment-gateway/pnp.php 92% from 13 tests

The entry point to "PnP (Pick and Pay) Payment Gateway For Woocommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pnp-pick-and-pay-payment-gateway.php" instead of "pnp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin170 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13852170

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity6.17
▷ Minimum method complexity2.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin