10% wizit-gateway-for-woocommerce

Code Review | Wizit Gateway for WooCommerce

WordPress plugin Wizit Gateway for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: wizit-gateway-for...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Nov 24, 2023
  • Number of updates: 22
  • Update frequency: every 10.9 days
  • Top authors: wizit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,173 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wizit-gateway-for-woocommerce/wizit-gateway.php+415
    Undefined offset: 1

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

Server-side resources used by Wizit Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.94 ▲2.87
Dashboard /wp-admin3.31 ▲0.0046.49 ▼2.58
Posts /wp-admin/edit.php3.36 ▲0.0044.46 ▼9.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.38 ▼11.94
Media Library /wp-admin/upload.php3.23 ▲0.0035.36 ▲1.54

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

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

Browser metrics Passed 4 tests

Wizit Gateway for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▲0.351.65 ▼0.2138.99 ▼4.33
Dashboard /wp-admin2,195 ▲185.60 ▼0.0593.99 ▲2.6840.03 ▼0.03
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0736.45 ▼7.2232.11 ▼8.02
Add New Post /wp-admin/post-new.php1,526 ▼922.87 ▼2.39663.72 ▲56.9555.01 ▼18.91
Media Library /wp-admin/upload.php1,400 ▼34.19 ▲0.0294.46 ▼7.4541.49 ▼5.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wizit-gateway-for-woocommerce/wizit-gateway.php+415
    Undefined offset: 1
  • Incomplete uninstall procedure, leaving 40 files (3.06MB) in the plugin directory
    • (new file) assets/js/checkout-chart.js
    • (new file) assets/js/custom-popup.js
    • (new file) GPL-3.0.txt
    • (new file) assets/js/chart-loader.js
    • (new file) README.md
    • (new file) assets/js/admin.js
    • (new file) assets/css/checkout.css
    • (new file) assets/css/admin.css
    • (new file) assets/css/custom-popup.css
    • (new file) assets/js/capture-payment.js
    • ...
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wizit-gateway-for-woocommerce/wizit/access.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/wizit-gateway-for-woocommerce/wizit/wysiwyg.html.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.png.), #2 (This screen shot description corresponds to screenshot-2.png.), #3 (This screen shot description corresponds to screenshot-3.png.)
Please take inspiration from this readme.txt

wizit-gateway-for-woocommerce/wizit-gateway.php 92% from 13 tests

The main file in "Wizit Gateway for WooCommerce" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wizit-gateway-for-woocommerce.php" instead of "wizit-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin48,050 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS767320744,122
PHP82,8333812,719
JavaScript913960922
HTML1100285
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity64.20
▷ Minimum class complexity2.00
▷ Maximum class complexity118.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods76
▷ Static methods1418.42%
▷ Public methods6990.79%
▷ Protected methods00.00%
▷ Private methods79.21%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.49MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wizit_popup.png295.02KB91.08KB▼ 69.13%
assets/popup/img/wizpay-logo-popup.png5.08KB3.00KB▼ 40.95%
images/Group_old.png7.02KB3.60KB▼ 48.73%
assets/popup/img/swoosh-popup.png67.35KB18.78KB▼ 72.11%
assets/popup/img/shopping-bag-popup.png51.85KB13.28KB▼ 74.39%