89% webmicro-nmi-woo-addon

Code Review | Network Merchant Payment Gateway for WooCommerce

WordPress plugin Network Merchant Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: webmicro-nmi-woo-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Oct 9, 2016
  • Number of updates: 5
  • Update frequency: every 45.2 days
  • Top authors: nazrulhassanmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /2,962 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.15MB] [CPU: ▼4.35ms] Passed 4 tests

An overview of server-side resources used by Network Merchant Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.32 ▼2.32
Dashboard /wp-admin3.45 ▲0.1544.93 ▼5.04
Posts /wp-admin/edit.php3.57 ▲0.2143.22 ▼2.03
Add New Post /wp-admin/post-new.php6.03 ▲0.1580.67 ▼7.99
Media Library /wp-admin/upload.php3.38 ▲0.1536.86 ▲3.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Network Merchant Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.201.55 ▼0.0839.38 ▼4.96
Dashboard /wp-admin2,209 ▲214.88 ▼0.0597.93 ▼21.7338.47 ▼4.29
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0034.63 ▼3.3730.77 ▼6.79
Add New Post /wp-admin/post-new.php1,538 ▲2423.37 ▲5.68661.20 ▼6.8967.15 ▲15.42
Media Library /wp-admin/upload.php1,388 ▼04.33 ▲0.09103.77 ▲6.9445.03 ▲0.53

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires at least: Version format is invalid
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

webmicro-nmi-woo-addon/webmicro-nmi-woo-addon.php Passed 13 tests

The entry point to "Network Merchant Payment Gateway for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
115 characters long description:
This plugin adds a payment option in WooCommerce for customers to pay with their Credit Cards Via Network Merchant.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin596 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28544596

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity15.50
▷ Minimum class complexity5.00
▷ Maximum class complexity26.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dinersclub.png1.27KB1.17KB▼ 8.22%
images/discover.png1.28KB1.30KB0.00%
images/nmi.png0.56KB0.35KB▼ 37.74%
images/mastercard.png1.62KB1.40KB▼ 13.37%
images/visa.png1.25KB1.29KB0.00%