83% nova2pay

Code Review | Nova2pay Hosted Payment Gateway - API+

WordPress plugin Nova2pay Hosted Payment Gateway - API+ scored83%from 54 tests.

About plugin

  • Plugin page: nova2pay
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.3-6.0
  • WordPress version: 6.3.1
  • First release: Jul 1, 2022
  • Latest release: Jun 19, 2023
  • Number of updates: 10
  • Update frequency: every 35.4 days
  • Top authors: marlboro90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.20ms] Passed 4 tests

Server-side resources used by Nova2pay Hosted Payment Gateway - API+
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.14 ▲1.29
Dashboard /wp-admin3.37 ▲0.0343.49 ▼14.56
Posts /wp-admin/edit.php3.48 ▲0.1348.46 ▲1.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0789.26 ▼4.85
Media Library /wp-admin/upload.php3.29 ▲0.0738.06 ▲5.44

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Nova2pay Hosted Payment Gateway - API+: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.26 ▼0.971.71 ▲0.0843.60 ▲3.18
Dashboard /wp-admin2,214 ▲234.86 ▼0.19108.42 ▲6.2941.88 ▲3.17
Posts /wp-admin/edit.php2,097 ▲51.98 ▼0.0539.32 ▲4.5336.44 ▲3.49
Add New Post /wp-admin/post-new.php1,544 ▲1523.37 ▲0.33606.83 ▼73.9548.37 ▼13.95
Media Library /wp-admin/upload.php1,396 ▲114.21 ▲0.0195.92 ▼5.1844.89 ▼1.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/nova2pay/includes/ntopay-wppg-apiplus.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nova2pay/includes/ntopay-wppg-apiplus-callback.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/nova2pay/includes/ntopay-wppg-apiplus.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Add Nova2pay account details), #2 (Hosted nova2pay payment form on checkout page)
You can look at the official readme.txt

nova2pay/ntopay-wppg-apiplus.php 85% from 13 tests

The main PHP file in "Nova2pay Hosted Payment Gateway - API+" 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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nova2pay.php" instead of "ntopay-wppg-apiplus.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin369 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36881369

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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