89% neox-payments-for-woocommerce

Code Review | NeoX Payments for WooCommerce

WordPress plugin NeoX Payments for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: neox-payments-for...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Nov 17, 2023
  • Number of updates: 19
  • Update frequency: every 20.3 days
  • Top authors: neopayvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /760 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.63ms] Passed 4 tests

A check of server-side resources used by NeoX Payments for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.40 ▼7.32
Dashboard /wp-admin3.33 ▲0.0243.08 ▼5.97
Posts /wp-admin/edit.php3.38 ▲0.0243.46 ▼3.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.70 ▲3.58
Media Library /wp-admin/upload.php3.25 ▲0.0233.25 ▼2.16

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

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

Browser metrics Passed 4 tests

A check of browser resources used by NeoX Payments for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.15 ▼0.561.76 ▲0.1444.19 ▲1.40
Dashboard /wp-admin2,202 ▲325.62 ▼0.0397.44 ▼4.7744.72 ▲1.58
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0239.62 ▲0.3940.29 ▲6.90
Add New Post /wp-admin/post-new.php1,530 ▲423.20 ▲0.05598.06 ▼71.9651.79 ▲3.56
Media Library /wp-admin/upload.php1,398 ▼54.20 ▼0.02102.30 ▲2.9343.81 ▼0.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (The settings page under WooCommerce -> NeoX.), #2 (Prices are changed to "K", and the symbol is now "VND".), #3 (NeoX Payment Gateway.)
Please take inspiration from this readme.txt

neox-payments-for-woocommerce/neox.php 85% from 13 tests

Analyzing the main PHP file in "NeoX Payments for WooCommerce" version 1.0.7
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "3.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("neox-payments-for-woocommerce.php" instead of "neox.php")

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
No dangerous file extensions were detected936 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP786259722
PO File16468193
Markdown110021

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.50
▷ Minimum class complexity3.00
▷ Maximum class complexity28.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods34
▷ Static methods411.76%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/neox_payment.png4.53KB4.53KB0.02%