89% woo-mygate

Code Review | Woocommerce Mygate

WordPress plugin Woocommerce Mygate scored89%from 54 tests.

About plugin

  • Plugin page: woo-mygate
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 21, 2018
  • Latest release: Jul 21, 2018
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: amir_canteetu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /713 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
Installer ran successfully

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

This is a short check of server-side resources used by Woocommerce Mygate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.68 ▲2.46
Dashboard /wp-admin3.32 ▼0.0243.65 ▼20.37
Posts /wp-admin/edit.php3.37 ▲0.0242.64 ▼0.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.07 ▼8.66
Media Library /wp-admin/upload.php3.24 ▲0.0237.64 ▲3.90

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Mygate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.34 ▲0.081.66 ▼0.0938.73 ▼2.59
Dashboard /wp-admin2,207 ▲265.55 ▼0.1086.32 ▼19.1037.87 ▲1.56
Posts /wp-admin/edit.php2,115 ▲152.00 ▲0.0337.87 ▲2.7934.18 ▲0.57
Add New Post /wp-admin/post-new.php1,540 ▲1323.10 ▲0.09621.91 ▲17.2556.63 ▼17.55
Media Library /wp-admin/upload.php1,415 ▲154.24 ▲0.0397.55 ▼9.8244.46 ▲1.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: checkout, woocommerce, mygate, payment gateway, payment

woo-mygate/woocommerce-mygate.php 85% from 13 tests

"Woocommerce Mygate" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-mygate.php" instead of "woocommerce-mygate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected433 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9119224430
JavaScript12273
CSS1040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.50
▷ Minimum class complexity3.00
▷ Maximum class complexity26.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1376.47%
▷ Protected methods317.65%
▷ Private methods15.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
assets/images/mygate.png6.33KB4.28KB▼ 32.45%