84% woocommerce-zaakpay-payment-gateway

Code Review | Woocommerce Zaakpay Payment Gateway

WordPress plugin Woocommerce Zaakpay Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-zaakp...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.2
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: May 1, 2015
  • Number of updates: 10
  • Update frequency: every 65.0 days
  • Top authors: Dualcube (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.60ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Zaakpay Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.99 ▼5.72
Dashboard /wp-admin3.41 ▲0.1148.18 ▼3.94
Posts /wp-admin/edit.php3.52 ▲0.1752.12 ▼4.47
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.39 ▲6.64
Media Library /wp-admin/upload.php3.33 ▲0.1037.42 ▼0.25

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

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

Browser metrics Passed 4 tests

Woocommerce Zaakpay Payment Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.19 ▼1.181.81 ▲0.1344.80 ▼0.09
Dashboard /wp-admin2,213 ▲224.86 ▲0.02107.26 ▼11.7039.75 ▼4.67
Posts /wp-admin/edit.php2,095 ▲62.14 ▲0.1035.78 ▼3.7732.64 ▼3.98
Add New Post /wp-admin/post-new.php1,535 ▲723.13 ▲4.93669.18 ▼1.4453.30 ▼8.99
Media Library /wp-admin/upload.php1,392 ▲14.25 ▲0.0594.04 ▼12.0447.81 ▼1.44

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 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/woocommerce-zaakpay-payment-gateway/woocommerce-zpay.php:14

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: woocommerce plugin, payment gateway, woocommerce payment gateway, woocommerce, woocommerce zaakpay payment gateway...

woocommerce-zaakpay-payment-gateway/woocommerce-zpay.php 92% from 13 tests

The principal PHP file in "Woocommerce Zaakpay Payment Gateway" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-zaakpay-payment-gateway.php" instead of "woocommerce-zpay.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 plugin590 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26362590

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity24.50
▷ Minimum class complexity6.00
▷ Maximum class complexity43.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods525.00%
▷ Public methods1680.00%
▷ Protected methods00.00%
▷ Private methods420.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
images/logo.png5.19KB3.52KB▼ 32.17%