10% nlb-payment-gateway-for-woocommerce

Code Review | NLB Payment Gateway For Woocommerce

WordPress plugin NLB Payment Gateway For Woocommerce scored 10% from 54 tests.

About plugin

  • Plugin page: nlb-payment-gatew...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Jan 15, 2020
  • Number of updates: 15
  • Update frequency: every 71.7 days
  • Top authors: m1tk00 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active / 2,236 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/nlb-payment-gateway-for-woocommerce/tebank-files/e24PaymentPipe.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; e24PaymentPipe has a deprecated constructor

Server metrics [RAM: ▼1.69MB] [CPU: ▼53.86ms] Passed 4 tests

An overview of server-side resources used by NLB Payment Gateway For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.174.64 ▼40.71
Dashboard /wp-admin2.32 ▼0.996.46 ▼47.18
Posts /wp-admin/edit.php2.32 ▼1.046.64 ▼40.54
Add New Post /wp-admin/post-new.php2.32 ▼3.577.04 ▼86.99
Media Library /wp-admin/upload.php2.32 ▼0.915.50 ▼27.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 158 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by NLB Payment Gateway For Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.19 ▼1.161.93 ▼0.1747.09 ▲4.68
Dashboard /wp-admin2,206 ▲184.84 ▼1.04110.43 ▲8.3343.60 ▲2.61
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0241.54 ▲4.5334.03 ▼1.43
Add New Post /wp-admin/post-new.php1,533 ▼123.45 ▲0.18600.01 ▼62.4159.28 ▲2.79
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.0794.28 ▼9.3142.78 ▼0.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/nlb-payment-gateway-for-woocommerce/tebank-files/e24PaymentPipe.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; e24PaymentPipe has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
  • 74× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Json\\ResponseObject' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/trunk/bankar-files/src/CustomerProfile/DeleteProfileResponse.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'PaymentGateway\\Client\\Http\\ResponseInterface' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/bankar-files/src/Http/Response.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/trunk/classes/class-woocomemrce-nlb-payment-bankar.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Data\\Customer' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/bankar-files/src/Data/IbanCustomer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Transaction\\Base\\AbstractTransactionWithReference' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/trunk/bankar-files/src/Transaction/Refund.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/classes/class-woocomemrce-nlb-payment-bankar.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Data\\Customer' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/trunk/bankar-files/src/Data/CreditCardCustomer.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Exception\\ClientException' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/bankar-files/src/Exception/TypeException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Json\\DataObject' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/bankar-files/src/CustomerProfile/CustomerData.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentGateway\\Client\\Data\\Result\\ResultData' not found in wp-content/plugins/nlb-payment-gateway-for-woocommerce/bankar-files/src/Data/Result/CreditcardData.php:10

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Contributors: Contributors not specified
You can look at the official readme.txt

nlb-payment-gateway-for-woocommerce/nlb-payment-gateway-for-woocommerce.php 92% from 13 tests

The primary PHP file in "NLB Payment Gateway For Woocommerce" version 2.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected6,208 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP751,6204,2446,159
Markdown117049

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.23
Average class complexity8.74
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces15
Interfaces14
Traits10
Classes122
▷ Abstract classes86.56%
▷ Concrete classes11493.44%
▷ Final classes00.00%
Methods1,456
▷ Static methods181.24%
▷ Public methods1,35893.27%
▷ Protected methods644.40%
▷ Private methods342.34%
Functions18
▷ Named functions1477.78%
▷ Anonymous functions422.22%
Constants334
▷ Global constants41.20%
▷ Class constants33098.80%
▷ Public constants330100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.53MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gateway-tebank-checkout.png26.87KB7.27KB▼ 72.95%
screenshots/gateway-tebank-checkout.png26.87KB7.27KB▼ 72.95%
gateway-tebank-settings.png108.51KB29.27KB▼ 73.03%
trunk/screenshots/gateway-tebank-checkout.png26.87KB7.27KB▼ 72.95%
trunk/screenshots/gateway-tebank-settings.png108.51KB29.27KB▼ 73.03%