67% webpay-woocommerce-plugin

Code Review | WooCommerce Webpay Gateway Chilean

WordPress plugin WooCommerce Webpay Gateway Chilean scored 67% from 54 tests.

About plugin

  • Plugin page: webpay-woocommerc...
  • Plugin version: 3.7.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 25, 2013
  • Latest release: Oct 3, 2017
  • Number of updates: 33
  • Update frequency: every 46.4 days
  • Top authors: ctala (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

60+ active / 21,472 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.08ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Webpay Gateway Chilean
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.75 ▼1.83
Dashboard /wp-admin3.43 ▲0.1345.36 ▼1.09
Posts /wp-admin/edit.php3.55 ▲0.1955.91 ▲13.74
Add New Post /wp-admin/post-new.php6.01 ▲0.1384.88 ▼8.48
Media Library /wp-admin/upload.php3.36 ▲0.1336.91 ▲3.08

Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/webpay-woocommerce-plugin/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/webpay-woocommerce-plugin/DOCS/ejemploTr\303\241fico.txt"
Filesystem: 20 new files
Database: 1 new table, 7 new options
New tables
wp_webpay
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
webpay_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Webpay Gateway Chilean
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.12 ▼1.251.70 ▼0.0140.33 ▼3.95
Dashboard /wp-admin2,215 ▲305.85 ▲0.95107.68 ▼2.0140.65 ▲0.69
Posts /wp-admin/edit.php2,101 ▲152.06 ▲0.0440.45 ▲4.8336.80 ▲5.28
Add New Post /wp-admin/post-new.php1,526 ▲717.77 ▼5.32689.35 ▼1.1354.04 ▲4.37
Media Library /wp-admin/upload.php1,403 ▲154.24 ▲0.0597.27 ▲1.6747.09 ▲4.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_webpay
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • webpay_db_version
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/webpay-woocommerce-plugin/templates/webpay_error.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/webpay-woocommerce-plugin/helpers/webpay_install.php on line 11
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/webpay-woocommerce-plugin/helpers/webpay_install.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/webpay-woocommerce-plugin/WebPayPlus.php:38
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/webpay-woocommerce-plugin/templates/webpay_thankyou.php:6
    • > PHP Notice
      Undefined variable: order_id in wp-content/plugins/webpay-woocommerce-plugin/templates/webpay_error.php on line 14
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/webpay-woocommerce-plugin/helpers/webpay_install.php on line 14
    • > PHP Notice
      Undefined variable: order_id in wp-content/plugins/webpay-woocommerce-plugin/templates/webpay_error.php on line 15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/webpay-woocommerce-plugin/helpers/webpay_install.php on line 11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Requires at least: Version not formatted correctly
  • Tags: No tags were detected
You can look at the official readme.txt

webpay-woocommerce-plugin/WebPayPlus.php 92% from 13 tests

The primary PHP file in "WooCommerce Webpay Gateway Chilean" version 3.7.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("webpay-woocommerce-plugin.php" instead of "WebPayPlus.php")

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
Everything looks great! No dangerous files found in this plugin1,163 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP82372291,002
Markdown1560145
Bourne Shell141116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity87.00
▷ Minimum class complexity87.00
▷ Maximum class complexity87.00
Average method complexity5.53
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods526.32%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png5.92KB3.02KB▼ 49.08%
classes/assets/images/logo.png5.92KB3.02KB▼ 49.08%
assets/images/logo_webpay_plus.png2.07KB1.61KB▼ 22.15%
classes/assets/images/logo_webpay_plus.png2.07KB1.61KB▼ 22.15%