77% nexi-xpay-build

Code Review | Nexi XPay Build

WordPress plugin Nexi XPay Build scored77%from 54 tests.

About plugin

  • Plugin page: nexi-xpay-build
  • Plugin version: 7.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Aug 21, 2023
  • Number of updates: 38
  • Update frequency: every 43.6 days
  • Top authors: cartasi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,484 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: ▼3.97ms] Passed 4 tests

A check of server-side resources used by Nexi XPay Build
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.03 ▼4.99
Dashboard /wp-admin3.34 ▲0.0452.79 ▲1.00
Posts /wp-admin/edit.php3.39 ▲0.0349.34 ▼9.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.26 ▼2.35
Media Library /wp-admin/upload.php3.26 ▲0.0336.84 ▲3.01

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Nexi XPay Build
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.481.69 ▼0.0341.40 ▼2.05
Dashboard /wp-admin2,195 ▲185.57 ▼0.1089.33 ▼5.7840.71 ▼1.73
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0340.63 ▲0.3738.66 ▼1.15
Add New Post /wp-admin/post-new.php1,526 ▼222.94 ▼0.22685.97 ▲39.3155.80 ▲0.48
Media Library /wp-admin/upload.php1,403 ▲124.20 ▲0.01102.42 ▼3.1146.81 ▲1.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/nexi-xpay-build/templates/npg_payment_detail.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Nexi\\WC_Gateway_NPG_Generic_Method' not found in wp-content/plugins/nexi-xpay-build/src/classes/Nexi/WC_Gateway_NPG_APM.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Token_CC' not found in wp-content/plugins/nexi-xpay-build/src/classes/Nexi/WC_NPG_Token.php:16
    • > PHP Notice
      Undefined variable: showOperations in wp-content/plugins/nexi-xpay-build/templates/npg_payment_detail.php on line 94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nexi-xpay-build/templates/build_preview.php:4
    • > PHP Notice
      Undefined variable: canAccount in wp-content/plugins/nexi-xpay-build/templates/npg_payment_detail.php on line 94
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nexi-xpay-build/src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nexi-xpay-build/src/classes/Nexi/WC_Gateway_Admin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nexi-xpay-build/templates/pagodil_checkout.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/nexi-xpay-build/templates/npg_build_payment.php:1
    • > PHP Notice
      Undefined variable: showOperations in wp-content/plugins/nexi-xpay-build/templates/npg_payment_detail.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in nexi-xpay-build/assets to your readme.txt
The official readme.txt is a good inspiration

nexi-xpay-build/woocommerce-gateway-nexi-xpay.php 85% from 13 tests

This is the main PHP file of "Nexi XPay Build" version 7.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("nexi-xpay-build.php" instead of "woocommerce-gateway-nexi-xpay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected12,129 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,37373510,501
PO File1212275632
JavaScript511941575
CSS24920228
Markdown1660193

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.86
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes28
▷ Abstract classes27.14%
▷ Concrete classes2692.86%
▷ Final classes00.00%
Methods210
▷ Static methods11353.81%
▷ Public methods14870.48%
▷ Protected methods20.95%
▷ Private methods6028.57%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants36
▷ Global constants36100.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
There are no PNG files in this plugin