84% om-dusupay-gateway-woocommerce

Code Review | Om Dusupay Gateway Woocommerce

WordPress plugin Om Dusupay Gateway Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: om-dusupay-gatewa...
  • Plugin version: 01.01.03
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.0
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Aug 6, 2016
  • Number of updates: 5
  • Update frequency: every 31.8 days
  • Top authors: siddharthsingh91 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /964 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.03ms] Passed 4 tests

An overview of server-side resources used by Om Dusupay Gateway Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.61 ▼5.37
Dashboard /wp-admin3.31 ▲0.0145.24 ▼4.20
Posts /wp-admin/edit.php3.36 ▲0.0046.50 ▲4.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.98 ▼2.93
Media Library /wp-admin/upload.php3.23 ▲0.0032.33 ▼3.61

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Om Dusupay Gateway Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.36 ▼0.261.55 ▼0.0938.87 ▼8.84
Dashboard /wp-admin2,200 ▲235.65 ▼0.0583.98 ▼14.6338.16 ▼3.80
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0338.42 ▲2.7733.14 ▼2.02
Add New Post /wp-admin/post-new.php1,528 ▼323.08 ▼0.04660.67 ▼12.3464.74 ▲5.64
Media Library /wp-admin/upload.php1,402 ▼14.22 ▼0.08102.78 ▼6.3244.32 ▼4.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× 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/om-dusupay-gateway-woocommerce/including_js_css.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-dusupay-gateway-woocommerce/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Installed Plugin.), #2 (Configure Woocommerce > Settings > Payment Gateways.), #3 (Checkout Page.)
The official readme.txt might help

om-dusupay-gateway-woocommerce/index.php 92% from 13 tests

This is the main PHP file of "Om Dusupay Gateway Woocommerce" version 01.01.03, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("om-dusupay-gateway-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin258 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23843254
JavaScript1003
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/dusupaybtn6.png4.55KB2.14KB▼ 53.04%
img/logo.png3.06KB1.92KB▼ 37.01%