83% edd-paylike-payment-gateway

Code Review | Payment gateway via Paylike for Easy Digital Downloads

WordPress plugin Payment gateway via Paylike for Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: edd-paylike-payme...
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.2
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Mar 31, 2023
  • Number of updates: 23
  • Update frequency: every 93.0 days
  • Top authors: ionut.calara (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,831 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.24MB] [CPU: ▼6.11ms] Passed 4 tests

Analyzing server-side resources used by Payment gateway via Paylike for Easy Digital Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2441.78 ▲5.03
Dashboard /wp-admin3.54 ▲0.2348.10 ▲1.28
Posts /wp-admin/edit.php3.65 ▲0.3045.81 ▼4.18
Add New Post /wp-admin/post-new.php6.12 ▲0.2379.58 ▼18.74
Media Library /wp-admin/upload.php3.46 ▲0.2331.99 ▼2.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Payment gateway via Paylike for Easy Digital Downloads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.321.75 ▲0.0243.70 ▲4.46
Dashboard /wp-admin2,209 ▲245.88 ▼0.03101.61 ▲1.1736.83 ▼6.12
Posts /wp-admin/edit.php2,089 ▲182.02 ▼0.0339.67 ▲2.6634.35 ▲1.93
Add New Post /wp-admin/post-new.php1,533 ▼023.32 ▲0.22643.12 ▼35.2953.15 ▼5.56
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.1199.53 ▼10.7342.60 ▼4.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Paylike\\Exception\\ApiException' not found in wp-content/plugins/edd-paylike-payment-gateway/vendor/paylike/php-api/src/Exception/Unauthorized.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-paylike-payment-gateway/popup.php:68
    • > PHP Fatal error
      Uncaught Error: Class 'Paylike\\Exception\\ApiException' not found in wp-content/plugins/edd-paylike-payment-gateway/vendor/paylike/php-api/src/Exception/InvalidRequest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Paylike\\Exception\\ApiException' not found in wp-content/plugins/edd-paylike-payment-gateway/vendor/paylike/php-api/src/Exception/Forbidden.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/edd-paylike-payment-gateway/helpers.php:168
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/edd-paylike-payment-gateway/edd-paylike.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Paylike\\Exception\\ApiException' not found in wp-content/plugins/edd-paylike-payment-gateway/vendor/paylike/php-api/src/Exception/Conflict.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Paylike\\HttpClient\\HttpClientInterface' not found in wp-content/plugins/edd-paylike-payment-gateway/vendor/paylike/php-api/src/HttpClient/CurlClient.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/edd-paylike-payment-gateway/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/edd-paylike-payment-gateway/vendor/paylike/php-api/tests/BaseTest.php:7

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: edd, gateway, credit card, easy-digital-downloads, paylike

edd-paylike-payment-gateway/edd-paylike.php 69% from 13 tests

Analyzing the main PHP file in "Payment gateway via Paylike for Easy Digital Downloads" version 1.7.0
The following require your attention:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("edd-paylike-payment-gateway.php" instead of "edd-paylike.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin6,704 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP375141,0203,365
JavaScript25702393,084
Markdown2400130
JSON30076
XML22030
CSS13019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.41
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces1
Traits0
Classes26
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes00.00%
Methods119
▷ Static methods32.52%
▷ Public methods10588.24%
▷ Protected methods00.00%
▷ Private methods1411.76%
Functions43
▷ Named functions4195.35%
▷ Anonymous functions24.65%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin