90% omipay

Code Review | Omipay for WooCommerce

WordPress plugin Omipay for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: omipay
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2022
  • Latest release: Nov 11, 2022
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: omipay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,535 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.82ms] Passed 4 tests

Analyzing server-side resources used by Omipay for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.86 ▼8.60
Dashboard /wp-admin3.37 ▲0.0745.96 ▼0.09
Posts /wp-admin/edit.php3.48 ▲0.1346.31 ▼1.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0789.45 ▼8.80
Media Library /wp-admin/upload.php3.29 ▲0.0735.57 ▲1.13

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Omipay for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.151.73 ▲0.0439.92 ▼1.50
Dashboard /wp-admin2,206 ▲175.91 ▲0.80105.32 ▼11.9339.87 ▼4.08
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0141.70 ▼3.0336.86 ▲1.50
Add New Post /wp-admin/post-new.php1,514 ▼1917.53 ▼5.94600.67 ▼40.6749.53 ▼15.61
Media Library /wp-admin/upload.php1,385 ▼34.13 ▼0.0694.23 ▼19.2141.31 ▼8.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: payments, omipay, checkout, woocommerce, ecommerce

omipay/class-wc-gateway-omipay.php 92% from 13 tests

The main file in "Omipay for WooCommerce" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("omipay.php" instead of "class-wc-gateway-omipay.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
No dangerous file extensions were detected426 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP56554426

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png1.46KB0.96KB▼ 34.38%