90% pay-in-store-woocommerce-payment-gateway

Code Review | Pay in Store WooCommerce Payment Gateway

WordPress plugin Pay in Store WooCommerce Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: pay-in-store-wooc...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Feb 21, 2022
  • Number of updates: 21
  • Update frequency: every 84.9 days
  • Top authors: enartia (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

4,000+ active /17,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Pay in Store WooCommerce Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0454.06 ▲13.90
Dashboard /wp-admin3.34 ▲0.0444.32 ▼8.44
Posts /wp-admin/edit.php3.39 ▲0.0345.14 ▼3.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.85 ▼2.70
Media Library /wp-admin/upload.php3.26 ▲0.0335.93 ▲2.58

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pay in Store WooCommerce Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.33 ▼0.982.26 ▲0.3743.52 ▼1.11
Dashboard /wp-admin2,206 ▲144.85 ▼0.07107.01 ▼5.1542.40 ▲0.74
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0541.32 ▲3.2834.39 ▼0.41
Add New Post /wp-admin/post-new.php1,536 ▲323.41 ▲0.03611.50 ▼20.7855.47 ▲2.26
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.05102.42 ▼0.3241.61 ▼1.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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: ecommerce, woocommerce, payment gateway

pay-in-store-woocommerce-payment-gateway/woo-payment-gateway-payinstore.php 92% from 13 tests

Analyzing the main PHP file in "Pay in Store WooCommerce Payment Gateway" version 1.2.6
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pay-in-store-woocommerce-payment-gateway.php" instead of "woo-payment-gateway-payinstore.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
Everything looks great! No dangerous files found in this plugin170 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13852170

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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
No PNG images were found in this plugin