84% ngan-luong-payment-gateway-for-woocommerce

Code Review | Ngan Luong payment gateway for Woocommerce

WordPress plugin Ngan Luong payment gateway for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: ngan-luong-paymen...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2014
  • Latest release: May 2, 2014
  • Number of updates: 5
  • Update frequency: every 4.8 days
  • Top authors: JoshKay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.11ms] Passed 4 tests

Server-side resources used by Ngan Luong payment gateway for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0547.28 ▼4.55
Dashboard /wp-admin3.40 ▲0.0248.38 ▼13.64
Posts /wp-admin/edit.php3.52 ▲0.1253.12 ▼1.24
Add New Post /wp-admin/post-new.php5.98 ▲0.0599.63 ▲6.62
Media Library /wp-admin/upload.php3.32 ▲0.0540.12 ▲2.99

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Ngan Luong payment gateway for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.021.56 ▼0.4546.02 ▲1.89
Dashboard /wp-admin2,192 ▲255.49 ▼0.1582.57 ▼27.4938.30 ▼2.69
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0338.98 ▼3.6036.02 ▼2.04
Add New Post /wp-admin/post-new.php1,526 ▼823.02 ▲4.84623.99 ▼4.9256.31 ▼15.02
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0094.36 ▼1.9146.06 ▲4.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ngan-luong-payment-gateway-for-woocommerce/ngan-luong-payment-gateway-for-woocommerce.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: woocommerce, nganluong, vietnamese

ngan-luong-payment-gateway-for-woocommerce/ngan-luong-payment-gateway-for-woocommerce.php Passed 13 tests

"Ngan Luong payment gateway for Woocommerce" version 1.4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Full integration for Ngan Luong payment gateway for WooCommerce

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
Everything looks great! No dangerous files found in this plugin402 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15165266
PO File182149136

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected