84% woo-alipay

Code Review | Payment gateway for WooCommerce - Woo Alipay

WordPress plugin Payment gateway for WooCommerce - Woo Alipay scored 84% from 54 tests.

About plugin

  • Plugin page: woo-alipay
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-5.4
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: Apr 12, 2020
  • Number of updates: 6
  • Update frequency: every 12.5 days
  • Top authors: frogerme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 4,476 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.57ms] Passed 4 tests

Server-side resources used by Payment gateway for WooCommerce - Woo Alipay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.71 ▼2.54
Dashboard /wp-admin3.34 ▲0.0347.10 ▼3.15
Posts /wp-admin/edit.php3.39 ▲0.0347.99 ▼3.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.70 ▼13.12
Media Library /wp-admin/upload.php3.26 ▲0.0335.11 ▲0.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 129 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
woo_alipay_plugin_version
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Payment gateway for WooCommerce - Woo Alipay
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.095.98 ▲3.9541.57 ▼10.92
Dashboard /wp-admin2,206 ▲185.82 ▼0.0799.30 ▼15.1739.33 ▼8.28
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0140.29 ▲2.5635.91 ▼0.31
Add New Post /wp-admin/post-new.php1,535 ▲1623.27 ▲0.07648.16 ▼52.6357.06 ▲8.78
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.17107.31 ▲3.7748.01 ▲1.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • woo_alipay_plugin_version
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'LtDbSqlAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/DB/Adapter/SqlAdapter/DbSqlAdapterPgsql.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtStore' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/StoreMemory.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtSessionStore' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/Session/Store/SessionStoreSqlite.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtDbConnectionAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/DB/Adapter/ConnectionAdapter/DbConnectionAdapterPdo.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtCacheAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/Cache/Adapter/CacheAdapterApc.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtStore' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/StoreFile.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtDbConnectionAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/DB/Adapter/ConnectionAdapter/DbConnectionAdapterPgsql.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtDbConnectionAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/DB/Adapter/ConnectionAdapter/DbConnectionAdapterMysqli.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'LtDbConnectionAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/DB/Adapter/ConnectionAdapter/DbConnectionAdapterSqlite.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'LtCacheAdapter' not found in wp-content/plugins/woo-alipay/lib/alipay/lotusphp_runtime/Cache/Adapter/CacheAdapterMemcache.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: payment gateway, payments, alipay, alibaba

woo-alipay/woo-alipay.php Passed 13 tests

The entry point to "Payment gateway for WooCommerce - Woo Alipay" version 1.1.3 is a PHP file that has certain tags in its header comment area
51 characters long description:
Integrate Woocommerce with Alipay (Mainland China).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin12,304 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP991,5121,5287,964
SVG1043,531
PO File1116154409
CSS4380247
Markdown1430104
JavaScript29149

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.93
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes85
▷ Abstract classes33.53%
▷ Concrete classes8296.47%
▷ Final classes00.00%
Methods684
▷ Static methods71.02%
▷ Public methods58084.80%
▷ Protected methods8913.01%
▷ Private methods152.19%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected