88% easy-digital-downloads-payment-gateway-by-novalnet

Code Review | Easy Digital Downloads payment plugin - Novalnet AG

WordPress plugin Easy Digital Downloads payment plugin - Novalnet AG scored88%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Dec 10, 2014
  • Latest release: Oct 6, 2022
  • Number of updates: 36
  • Update frequency: every 79.4 days
  • Top authors: Novalnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,087 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Easy Digital Downloads payment plugin - Novalnet AG
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.85 ▼4.52
Dashboard /wp-admin3.38 ▲0.0448.37 ▼19.72
Posts /wp-admin/edit.php3.42 ▲0.0650.35 ▲0.07
Add New Post /wp-admin/post-new.php6.06 ▲0.1776.96 ▼28.02
Media Library /wp-admin/upload.php3.32 ▲0.1037.58 ▲0.05

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Digital Downloads payment plugin - Novalnet AG
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲4813.69 ▼0.361.72 ▼0.2943.84 ▼2.52
Dashboard /wp-admin2,225 ▲405.87 ▲0.02101.81 ▼8.2237.76 ▼1.68
Posts /wp-admin/edit.php2,108 ▲192.00 ▼0.1240.78 ▲0.4838.69 ▲0.95
Add New Post /wp-admin/post-new.php1,552 ▲3823.44 ▲5.89677.70 ▼79.8953.56 ▼2.79
Media Library /wp-admin/upload.php1,404 ▲164.25 ▲0.13122.88 ▲5.7053.34 ▲4.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
Please take inspiration from this readme.txt

easy-digital-downloads-payment-gateway-by-novalnet/class-novalnet.php 69% from 13 tests

This is the main PHP file of "Easy Digital Downloads payment plugin - Novalnet AG" version 2.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-digital-downloads-payment-gateway-by-novalnet.php" instead of "class-novalnet.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin6,232 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP196041,9074,705
JavaScript514095756
PO File1224518750
CSS11021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity26.67
▷ Minimum class complexity5.00
▷ Maximum class complexity147.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods126
▷ Static methods1411.11%
▷ Public methods12498.41%
▷ Protected methods00.00%
▷ Private methods21.59%
Functions70
▷ Named functions70100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/novalnet_cc_discover.png1.89KB1.09KB▼ 42.58%
assets/images/novalnet_instantbank.png1.90KB1.38KB▼ 27.53%
assets/images/novalnet_sepa.png1.13KB1.54KB0.00%
(invalid) assets/images/novalnet_cashpayment.png1.60KB0.00KB▼ 100.00%
assets/images/novalnet_eps.png1.04KB1.74KB0.00%