90% merchantx

Code Review | MerchantX Gateway for WooCommerce

WordPress plugin MerchantX Gateway for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: merchantx
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2019
  • Latest release: Oct 3, 2019
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: merchantx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.14ms] Passed 4 tests

This is a short check of server-side resources used by MerchantX Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.41 ▼2.94
Dashboard /wp-admin3.32 ▲0.0242.93 ▼4.01
Posts /wp-admin/edit.php3.37 ▲0.0143.67 ▼3.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.06 ▼14.10
Media Library /wp-admin/upload.php3.24 ▲0.0137.18 ▲3.27

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for MerchantX Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.57 ▼1.071.69 ▼0.0939.18 ▼1.99
Dashboard /wp-admin2,216 ▲284.79 ▼1.10100.20 ▼6.1939.18 ▼2.24
Posts /wp-admin/edit.php2,095 ▲272.18 ▲0.1734.91 ▼1.8232.15 ▼0.85
Add New Post /wp-admin/post-new.php1,541 ▲823.05 ▼0.37587.92 ▼55.2453.71 ▼6.47
Media Library /wp-admin/upload.php1,395 ▲104.36 ▲0.2496.88 ▼5.8442.61 ▲0.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: woocommerce payment gateway, nmi plugins, merchantx, nmi, nmi gateway...

merchantx/merchantx.php 92% from 13 tests

The main PHP file in "MerchantX Gateway for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected775 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4150287775

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity25.67
▷ Minimum class complexity4.00
▷ Maximum class complexity68.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods511.63%
▷ Public methods3786.05%
▷ Protected methods12.33%
▷ Private methods511.63%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mastercard.png1.62KB1.40KB▼ 13.37%
images/jcb.png1.05KB0.76KB▼ 27.31%
images/dinersclub.png1.27KB1.17KB▼ 8.22%
images/visa.png1.25KB1.29KB0.00%
images/discover.png1.28KB1.30KB0.00%