84% edd-ytaskpayments-gateway

Code Review | Easy Digital download yTask Payment Gateway

WordPress plugin Easy Digital download yTask Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: edd-ytaskpayments...
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Sep 22, 2021
  • Latest release: Jul 14, 2022
  • Number of updates: 16
  • Update frequency: every 18.8 days
  • Top authors: opskill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.52ms] Passed 4 tests

Server-side resources used by Easy Digital download yTask Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.17 ▲2.09
Dashboard /wp-admin3.35 ▲0.0144.40 ▼12.43
Posts /wp-admin/edit.php3.41 ▲0.0544.07 ▼5.73
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.72 ▼12.41
Media Library /wp-admin/upload.php3.28 ▲0.0534.54 ▼3.52

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Digital download yTask Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.33 ▼0.402.00 ▲0.0542.57 ▲0.53
Dashboard /wp-admin2,189 ▲155.55 ▼0.0383.69 ▼0.9736.67 ▼3.32
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0334.42 ▼1.7434.77 ▼1.64
Add New Post /wp-admin/post-new.php1,535 ▲718.23 ▼5.11607.63 ▼52.1862.03 ▲8.52
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.0194.76 ▼9.5244.97 ▼0.13

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_strip_all_tags() in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 7
    • > PHP Notice
      Undefined variable: edd_options in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 5
    • > PHP Notice
      Undefined variable: edd_options in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 6
    • > PHP Notice
      Undefined variable: purchase_data in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 7
    • > PHP Notice
      Undefined variable: purchase_data in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 7
    • > PHP Notice
      Undefined variable: edd_options in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edd-ytaskpayments-gateway/submit_form.php on line 6

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: ecommerce, opskill, ytask, payment gateway, easy digital downloads...

edd-ytaskpayments-gateway/ytaskpayments-edd-gateway.php 92% from 13 tests

The main file in "Easy Digital download yTask Payment Gateway" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("edd-ytaskpayments-gateway.php" instead of "ytaskpayments-edd-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin236 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP295120236

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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