84% sepordeh-payment-gateway-for-easy-digital-downloads-edd

Code Review | Sepordeh Payment Gateway for Easy Digital Downloads (EDD)

WordPress plugin Sepordeh Payment Gateway for Easy Digital Downloads (EDD) scored84%from 54 tests.

About plugin

  • Plugin page: sepordeh-payment-...
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Oct 20, 2023
  • Number of updates: 3
  • Update frequency: every 241.3 days
  • Top authors: sepordeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /277 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
This plugin's installer ran successfully

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

A check of server-side resources used by Sepordeh Payment Gateway for Easy Digital Downloads (EDD)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.46 ▼4.65
Dashboard /wp-admin3.37 ▲0.0647.72 ▼1.79
Posts /wp-admin/edit.php3.42 ▲0.0644.40 ▲0.53
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.17 ▼23.23
Media Library /wp-admin/upload.php3.29 ▲0.0633.93 ▲2.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sepordeh Payment Gateway for Easy Digital Downloads (EDD)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.071.73 ▲0.1342.91 ▼1.47
Dashboard /wp-admin2,195 ▲175.62 ▼0.0984.29 ▼30.7839.29 ▼8.16
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0134.81 ▼7.3638.76 ▲3.28
Add New Post /wp-admin/post-new.php1,526 ▼923.11 ▲4.91668.10 ▲63.1152.15 ▼6.23
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0693.47 ▲0.0141.93 ▲2.08

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

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

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sepordeh-payment-gateway-for-easy-digital-downloads-edd/includes/toman-currency.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sepordeh-payment-gateway-for-easy-digital-downloads-edd/edd-sepordeh.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: edd, easy digital downloads, sepordeh, payment gateway, payment

sepordeh-payment-gateway-for-easy-digital-downloads-edd/edd-sepordeh.php 92% from 13 tests

This is the main PHP file of "Sepordeh Payment Gateway for Easy Digital Downloads (EDD)" version 3.0.1, 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sepordeh-payment-gateway-for-easy-digital-downloads-edd.php" instead of "edd-sepordeh.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin238 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36595238

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sepordeh.png18.26KB7.98KB▼ 56.28%