78% edd-paytr-payment-gateway

Code Review | EDD Paytr Payment Gateway

WordPress plugin EDD Paytr Payment Gateway scored 78% from 54 tests.

About plugin

  • Plugin page: edd-paytr-payment...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 31, 2019
  • Latest release: Oct 5, 2019
  • Number of updates: 8
  • Update frequency: every 8.4 days
  • Top authors: wpuzman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,005 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.04MB] [CPU: ▼4.70ms] Passed 4 tests

Analyzing server-side resources used by EDD Paytr Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.76 ▼5.61
Dashboard /wp-admin3.34 ▲0.0446.47 ▼1.94
Posts /wp-admin/edit.php3.39 ▲0.0449.22 ▲0.75
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.92 ▼12.00
Media Library /wp-admin/upload.php3.27 ▲0.0436.26 ▲2.57
EDD Paytr /wp-admin/options-general.php?page=edd-paytr3.2629.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for EDD Paytr Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.27 ▼1.111.72 ▼0.1344.15 ▲0.66
Dashboard /wp-admin2,213 ▲255.86 ▲0.97107.80 ▲2.9138.19 ▼5.56
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0639.41 ▼0.9040.36 ▲5.24
Add New Post /wp-admin/post-new.php1,517 ▼1117.75 ▼0.67639.51 ▲27.8956.60 ▲2.63
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0299.31 ▼5.6143.01 ▼1.47
EDD Paytr /wp-admin/options-general.php?page=edd-paytr8592.1721.7926.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/edd-paytr-payment-gateway/public/partials/edd-paytr-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/edd-paytr-payment-gateway/admin/partials/edd-paytr-admin-display.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: payment, easy digital downloads, gateway, edd, paytr...

edd-paytr-payment-gateway/edd-paytr.php 85% from 13 tests

The primary PHP file in "EDD Paytr Payment Gateway" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("edd-paytr-payment-gateway.php" instead of "edd-paytr.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin518 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12173602512
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin