84% nganluong-nganluongvn-paygate-for-woocommerce

Code Review | NganLuong.vn cho Woocommerce

WordPress plugin NganLuong.vn cho Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: nganluong-nganluo...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2015
  • Latest release: Feb 5, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: sontq00787 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by NganLuong.vn cho Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.56 ▼5.46
Dashboard /wp-admin3.34 ▲0.0348.70 ▲0.58
Posts /wp-admin/edit.php3.39 ▲0.0347.11 ▼0.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.13 ▼4.05
Media Library /wp-admin/upload.php3.26 ▲0.0233.72 ▼0.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for NganLuong.vn cho Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.121.62 ▼0.3340.65 ▼7.51
Dashboard /wp-admin2,209 ▲174.86 ▼0.03104.55 ▼1.3239.73 ▼2.90
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0441.14 ▼2.2035.19 ▼1.64
Add New Post /wp-admin/post-new.php1,533 ▲523.17 ▼0.15654.13 ▼30.0953.92 ▼5.55
Media Library /wp-admin/upload.php1,382 ▼34.21 ▼0.1298.39 ▼5.9743.61 ▲0.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nganluong-nganluongvn-paygate-for-woocommerce/nganluongvn.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: nganluong, woocommerce, vietnamese

nganluong-nganluongvn-paygate-for-woocommerce/nganluongvn.php 92% from 13 tests

"NganLuong.vn cho Woocommerce" version 0.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("nganluong-nganluongvn-paygate-for-woocommerce.php" instead of "nganluongvn.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 plugin140 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12217140

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin