10% woo-nganluong-gateway

Code Review | WooCommerce NganLuong Gateway

WordPress plugin WooCommerce NganLuong Gateway scored10%from 54 tests.

About plugin

  • Plugin page: woo-nganluong-gat...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Apr 9, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: sangltdn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,115 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/woo-nganluong-gateway/gateway-nganluong.php+18
    Use of undefined constant WC_Gateway_NganLuong - assumed 'WC_Gateway_NganLuong' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼2.23MB] [CPU: ▼60.85ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce NganLuong Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.684.22 ▼37.76
Dashboard /wp-admin2.07 ▼1.566.22 ▼59.12
Posts /wp-admin/edit.php2.08 ▼1.607.26 ▼49.81
Add New Post /wp-admin/post-new.php2.08 ▼4.075.07 ▼96.69
Media Library /wp-admin/upload.php2.08 ▼1.416.76 ▼31.45

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce NganLuong Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.271.74 ▲0.0344.42 ▼2.06
Dashboard /wp-admin2,198 ▲215.59 ▼0.0390.92 ▼1.4139.54 ▼0.96
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0440.36 ▼2.1538.02 ▲0.94
Add New Post /wp-admin/post-new.php1,546 ▼523.40 ▲5.06666.64 ▲7.3858.78 ▲5.30
Media Library /wp-admin/upload.php1,403 ▲64.26 ▲0.01109.23 ▼2.2548.90 ▲3.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/woo-nganluong-gateway/gateway-nganluong.php+18
    Use of undefined constant WC_Gateway_NganLuong - assumed 'WC_Gateway_NganLuong' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-nganluong-gateway/classes/class-wc-gateway-nganluong.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-nganluong-gateway/gateway-nganluong.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: woocommerce nganluong, thanh toan nganluongvn, woocommerce gateway

woo-nganluong-gateway/gateway-nganluong.php 92% from 13 tests

Analyzing the main PHP file in "WooCommerce NganLuong Gateway" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-nganluong-gateway.php" instead of "gateway-nganluong.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
There were no executable files found in this plugin283 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24667283

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin