84% nochex-payment-gateway-for-woocommerce

Code Review | WooCommerce Payment Gateway - Nochex

WordPress plugin WooCommerce Payment Gateway - Nochex scored84%from 54 tests.

About plugin

  • Plugin page: nochex-payment-ga...
  • Plugin version: 2.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 28
  • Update frequency: every 72.9 days
  • Top authors: nochexdevteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,845 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.03MB] [CPU: ▼8.58ms] Passed 4 tests

A check of server-side resources used by WooCommerce Payment Gateway - Nochex
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.27 ▼3.13
Dashboard /wp-admin3.33 ▲0.0343.22 ▼7.05
Posts /wp-admin/edit.php3.38 ▲0.0340.85 ▼5.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.52 ▼18.54
Media Library /wp-admin/upload.php3.26 ▲0.0334.59 ▲0.88

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Payment Gateway - Nochex
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.091.55 ▲0.0342.48 ▲4.34
Dashboard /wp-admin2,198 ▲275.59 ▲0.0682.71 ▼6.5637.90 ▼4.14
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.1134.12 ▼7.6133.27 ▼6.80
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.52640.50 ▼133.5054.71 ▼10.61
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0194.39 ▼4.7642.77 ▲0.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order' not found in wp-content/plugins/nochex-payment-gateway-for-woocommerce/includes/class-wc-nochex-formBuilding.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: The official readme.txt is a good inspiration

nochex-payment-gateway-for-woocommerce/class-wc-nochex.php 92% from 13 tests

"WooCommerce Payment Gateway - Nochex" version 2.7.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nochex-payment-gateway-for-woocommerce.php" instead of "class-wc-nochex.php")

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
Everything looks great! No dangerous files found in this plugin578 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54275454
Markdown1610124

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/nochex-logo.png7.83KB2.29KB▼ 70.71%