89% woo-payment-gateway-for-piraeus-bank

Code Review | Piraeus Bank WooCommerce Payment Gateway

WordPress plugin Piraeus Bank WooCommerce Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: woo-payment-gatew...
  • Plugin version: 1.6.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Feb 28, 2022
  • Number of updates: 51
  • Update frequency: every 35.3 days
  • Top authors: enartia (62.75%)georgekapsalakis (39.22%)

Code review

54 tests

User reviews

23 reviews

Install metrics

4,000+ active /40,344 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼10.54ms] Passed 4 tests

This is a short check of server-side resources used by Piraeus Bank WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3145.04 ▲0.19
Dashboard /wp-admin3.62 ▲0.2751.87 ▼14.69
Posts /wp-admin/edit.php3.73 ▲0.3750.16 ▲0.63
Add New Post /wp-admin/post-new.php6.20 ▲0.3195.67 ▼20.18
Media Library /wp-admin/upload.php3.54 ▲0.3136.57 ▼7.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Piraeus Bank WooCommerce Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.121.64 ▼0.6840.96 ▼1.06
Dashboard /wp-admin2,198 ▲215.61 ▼0.0589.68 ▼0.4539.48 ▼4.74
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0140.20 ▲4.6535.71 ▼3.49
Add New Post /wp-admin/post-new.php1,544 ▲1822.82 ▼0.43637.43 ▼46.0252.30 ▼8.45
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.02103.10 ▲3.3946.34 ▲0.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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, payment gateway, woocommerce

woo-payment-gateway-for-piraeus-bank/wooshop-piraeus.php 85% from 13 tests

Analyzing the main PHP file in "Piraeus Bank WooCommerce Payment Gateway" version 1.6.5.1
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-payment-gateway-for-piraeus-bank.php" instead of "wooshop-piraeus.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,060 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11821051,689
PO File1111144362
SVG2209

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/PB_blue_GR.png5.99KB2.46KB▼ 58.85%