89% paydunya-woocommerce-payment-gateway

Code Review | PAYDUNYA WOOCOMMERCE PAR

WordPress plugin PAYDUNYA WOOCOMMERCE PAR scored 89% from 54 tests.

About plugin

  • Plugin page: paydunya-woocomme...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.8-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: Dec 18, 2020
  • Number of updates: 46
  • Update frequency: every 40.8 days
  • Top authors: paydunya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 8,028 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by PAYDUNYA WOOCOMMERCE PAR
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.85 ▲0.05
Dashboard /wp-admin3.31 ▲0.0045.75 ▲2.94
Posts /wp-admin/edit.php3.36 ▲0.0046.83 ▲3.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.20 ▲9.47
Media Library /wp-admin/upload.php3.23 ▲0.0033.88 ▲2.04

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for PAYDUNYA WOOCOMMERCE PAR
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1114.79 ▲1.561.66 ▼0.1042.42 ▼1.31
Dashboard /wp-admin2,209 ▲34.86 ▼0.00110.77 ▲1.4342.59 ▲2.98
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.64 ▲6.3235.58 ▲1.26
Add New Post /wp-admin/post-new.php1,514 ▼1917.84 ▼5.50651.54 ▼28.2048.80 ▼5.46
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0292.41 ▼17.7843.51 ▼5.51

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (21 tag instead of maximum 10)
Please take inspiration from this readme.txt

paydunya-woocommerce-payment-gateway/paydunya-woocommerce-gateway.php 85% from 13 tests

The main PHP script in "PAYDUNYA WOOCOMMERCE PAR" version 1.1.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("paydunya-woocommerce-payment-gateway.php" instead of "paydunya-woocommerce-gateway.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 202 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 detected504 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16518404
Markdown139064
JavaScript20036

PHP code Passed 2 tests

Analyzing 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.19
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods425.00%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png0.92KB0.75KB▼ 18.74%