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
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.05 ▼1.68 | 4.22 ▼37.76 |
Dashboard /wp-admin | 2.07 ▼1.56 | 6.22 ▼59.12 |
Posts /wp-admin/edit.php | 2.08 ▼1.60 | 7.26 ▼49.81 |
Add New Post /wp-admin/post-new.php | 2.08 ▼4.07 | 5.07 ▼96.69 |
Media Library /wp-admin/upload.php | 2.08 ▼1.41 | 6.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
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.37 ▼0.27 | 1.74 ▲0.03 | 44.42 ▼2.06 |
Dashboard /wp-admin | 2,198 ▲21 | 5.59 ▼0.03 | 90.92 ▼1.41 | 39.54 ▼0.96 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.01 ▼0.04 | 40.36 ▼2.15 | 38.02 ▲0.94 |
Add New Post /wp-admin/post-new.php | 1,546 ▼5 | 23.40 ▲5.06 | 666.64 ▲7.38 | 58.78 ▲5.30 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.26 ▲0.01 | 109.23 ▼2.25 | 48.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
- > PHP Fatal error
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:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 46 | 67 | 283 |
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 code | 0.18 |
Average class complexity | 24.00 |
▷ Minimum class complexity | 24.00 |
▷ Maximum class complexity | 24.00 |
Average method complexity | 3.09 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 11 | |
▷ Static methods | 1 | 9.09% |
▷ Public methods | 11 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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