84% edd-netbilling-payment-gateway-basic

Code Review | Easy Digital Downloads - Netbilling Payment Gateway Basic

WordPress plugin Easy Digital Downloads - Netbilling Payment Gateway Basic scored84%from 54 tests.

About plugin

  • Plugin page: edd-netbilling-pa...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Nov 3, 2020
  • Number of updates: 46
  • Update frequency: every 11.3 days
  • Top authors: qctechjunkie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /647 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.01MB] [CPU: ▼8.08ms] Passed 4 tests

This is a short check of server-side resources used by Easy Digital Downloads - Netbilling Payment Gateway Basic
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.56 ▲1.53
Dashboard /wp-admin3.32 ▼0.0241.95 ▼17.84
Posts /wp-admin/edit.php3.37 ▲0.0246.15 ▼0.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.78 ▼13.76
Media Library /wp-admin/upload.php3.25 ▲0.0235.74 ▼0.40

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Digital Downloads - Netbilling Payment Gateway Basic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▼0.061.78 ▲0.2441.98 ▼0.02
Dashboard /wp-admin2,198 ▲175.58 ▼0.1383.09 ▼19.6035.73 ▼2.62
Posts /wp-admin/edit.php2,082 ▼182.00 ▼0.0141.51 ▲2.3937.85 ▲5.19
Add New Post /wp-admin/post-new.php1,526 ▼722.93 ▼0.05597.05 ▼92.0962.23 ▲15.65
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.0297.43 ▼5.3342.99 ▼1.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/edd-netbilling-payment-gateway-basic/includes/admin/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-netbilling-payment-gateway-basic/includes/payment-actions.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-netbilling-payment-gateway-basic/edd-netbilling.php:106
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-netbilling-payment-gateway-basic/includes/template-functions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: e-commerce, ecommerce, checkout, store, downloads...

edd-netbilling-payment-gateway-basic/edd-netbilling.php 92% from 13 tests

"Easy Digital Downloads - Netbilling Payment Gateway Basic" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("edd-netbilling-payment-gateway-basic.php" instead of "edd-netbilling.php")

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
Success! There were no dangerous files found in this plugin268 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP592102268

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods342.86%
▷ Protected methods00.00%
▷ Private methods457.14%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin