10% woo-paylate

Code Review | Gateway for PayLate on WooCommerce

WordPress plugin Gateway for PayLate on WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: woo-paylate
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Feb 27, 2018
  • Latest release: May 26, 2022
  • Number of updates: 17
  • Update frequency: every 91.1 days
  • Top authors: kaggdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,911 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/woo-paylate/classes/class-wc-paylate-plugin.php+49
    Trying to access array offset on value of type bool

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

Server-side resources used by Gateway for PayLate on WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.89 ▼6.14
Dashboard /wp-admin3.31 ▲0.0043.16 ▼3.02
Posts /wp-admin/edit.php3.36 ▲0.0050.60 ▲4.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.51 ▼7.01
Media Library /wp-admin/upload.php3.23 ▲0.0033.14 ▲0.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gateway for PayLate on WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.52 ▼0.871.70 ▼0.3840.87 ▼5.47
Dashboard /wp-admin2,209 ▲215.84 ▼0.04112.74 ▼2.5241.09 ▼1.03
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0238.57 ▼2.9535.50 ▼2.32
Add New Post /wp-admin/post-new.php1,514 ▼2117.72 ▼5.46670.37 ▲70.1753.48 ▲2.74
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0594.77 ▼9.4641.30 ▼3.16

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-paylate/classes/class-wc-paylate-gateway.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: woocommerce, paylate, gateway

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

The main PHP script in "Gateway for PayLate on WooCommerce" version 1.5.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-paylate.php" instead of "woocommerce-paylate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,420 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP133006881,249
PO File15864137
CSS11029
JSON1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.00
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods65
▷ Static methods2030.77%
▷ Public methods6092.31%
▷ Protected methods00.00%
▷ Private methods57.69%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/paylate-logo-32x32.png3.15KB1.75KB▼ 44.50%
images/paylate-logo-16x16.png1.00KB0.95KB▼ 5.05%
images/paylate-logo-64x64.png10.02KB3.51KB▼ 64.96%