68% uplexa-woocommerce-gateway

Code Review | uPlexa WooCommerce Extension

WordPress plugin uPlexa WooCommerce Extension scored68%from 54 tests.

About plugin

  • Plugin page: uplexa-woocommerc...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: Mar 7, 2019
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: quantumleaper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /617 total downloads

Benchmarks

Plugin footprint 65% 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.04MB] [CPU: ▼2.55ms] Passed 4 tests

This is a short check of server-side resources used by uPlexa WooCommerce Extension
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0545.61 ▲0.74
Dashboard /wp-admin3.35 ▲0.0449.90 ▲1.15
Posts /wp-admin/edit.php3.46 ▲0.1149.87 ▼1.28
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.17 ▼8.45
Media Library /wp-admin/upload.php3.27 ▲0.0435.64 ▼1.21

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

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

Browser metrics Passed 4 tests

A check of browser resources used by uPlexa WooCommerce Extension
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼0.851.73 ▼0.4438.90 ▼6.89
Dashboard /wp-admin2,209 ▲184.88 ▼1.02113.40 ▼9.2445.63 ▲4.50
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0139.74 ▲1.3935.12 ▲0.79
Add New Post /wp-admin/post-new.php1,543 ▲1023.21 ▼0.29651.67 ▼10.7851.25 ▼9.60
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.01100.10 ▼17.2843.92 ▼0.76

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_uplexa_gateway_live_rates
    • wp_uplexa_gateway_quotes_txids
    • wp_uplexa_gateway_quotes
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/customer/order-error-page.php
    • > /wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/customer/order-email-error-block.php
    • > /wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/admin/settings-page.php
  • 31× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/admin/order-history-page.php on line 4
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/admin/settings-page.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/admin/order-history-page.php on line 12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/uplexa-woocommerce-gateway/include/admin/class-uplexa-admin-payments-list.php on line 9
    • > PHP Notice
      Undefined variable: settings_html in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/admin/settings-page.php on line 18
    • > PHP Notice
      Undefined variable: details in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/customer/order-email-block.php on line 1
    • > PHP Notice
      Undefined variable: method_title in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/customer/order-error-page.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/admin/order-history-page.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/customer/order-email-block.php on line 17
    • > PHP Notice
      Undefined variable: method_title in wp-content/plugins/uplexa-woocommerce-gateway/templates/uplexa-gateway/customer/order-email-error-block.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (uPlexa Payment Box), #2 (uPlexa Options)
Please take inspiration from this readme.txt

uplexa-woocommerce-gateway/uplexa-woocommerce-gateway.php Passed 13 tests

The main PHP script in "uPlexa WooCommerce Extension" version 1.0.0 is automatically included on every request by WordPress
46 characters long description:
Extends WooCommerce by adding a uPlexa Gateway

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin4,241 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP184984382,912
JavaScript52233131,182
CSS10078
Markdown123060
YAML1519

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity37.11
▷ Minimum class complexity5.00
▷ Maximum class complexity99.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods152
▷ Static methods2617.11%
▷ Public methods12380.92%
▷ Protected methods1811.84%
▷ Private methods117.24%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants23
▷ Global constants1252.17%
▷ Class constants1147.83%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/uplexa-accepted-here.png10.43KB4.71KB▼ 54.78%
assets/images/uplexa-icon-admin.png0.68KB0.61KB▼ 10.63%
assets/images/uplexa-icon.png4.65KB2.56KB▼ 45.05%