90% woo-nations-trust-bank-american-express-payment-gateway

Code Review | Nations Trust Bank American Express payment Gateway

WordPress plugin Nations Trust Bank American Express payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: woo-nations-trust...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2017
  • Latest release: Jun 15, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: redevoke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.28ms] Passed 4 tests

Analyzing server-side resources used by Nations Trust Bank American Express payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.98 ▲1.18
Dashboard /wp-admin3.33 ▲0.0345.49 ▼5.64
Posts /wp-admin/edit.php3.38 ▲0.0351.34 ▲3.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.96 ▲0.81
Media Library /wp-admin/upload.php3.25 ▲0.0331.40 ▼5.47

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

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

Browser metrics Passed 4 tests

Nations Trust Bank American Express payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼0.741.76 ▲0.1042.08 ▲0.29
Dashboard /wp-admin2,209 ▲214.85 ▼0.0399.98 ▼7.6138.94 ▼3.55
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0738.26 ▼0.4838.44 ▲2.67
Add New Post /wp-admin/post-new.php1,533 ▲1923.23 ▲5.56635.38 ▼89.2253.53 ▼0.84
Media Library /wp-admin/upload.php1,388 ▲64.27 ▲0.0398.89 ▼7.7142.48 ▼4.89

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: american express, nations trust bank, nations trust ipg, amex, woocommerce...

woo-nations-trust-bank-american-express-payment-gateway/re_ntb_amex_payment_gateway.php 92% from 13 tests

The entry point to "Nations Trust Bank American Express payment Gateway" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-nations-trust-bank-american-express-payment-gateway.php" instead of "re_ntb_amex_payment_gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin119 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1308119

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
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
ntb_amex_payment_gateway_logo_redevoke_solutions.png12.62KB3.11KB▼ 75.36%