83% yedpay-for-woocommerce

Code Review | Yedpay for WooCommerce

WordPress plugin Yedpay for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: yedpay-for-woocom...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 16, 2019
  • Latest release: Oct 10, 2023
  • Number of updates: 51
  • Update frequency: every 29.8 days
  • Top authors: yedpaykenny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,550 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.78ms] Passed 4 tests

This is a short check of server-side resources used by Yedpay for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.60 ▲2.36
Dashboard /wp-admin3.31 ▼0.0348.62 ▼23.26
Posts /wp-admin/edit.php3.36 ▲0.0150.21 ▼0.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.57 ▼16.39
Media Library /wp-admin/upload.php3.24 ▲0.0135.07 ▲1.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Yedpay for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.67 ▲0.321.86 ▲0.0643.46 ▲0.01
Dashboard /wp-admin2,195 ▲155.63 ▲0.0192.58 ▲0.4640.49 ▼3.15
Posts /wp-admin/edit.php2,103 ▲32.03 ▼0.1141.23 ▲0.4134.76 ▼1.45
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▼0.33667.81 ▼23.7061.74 ▲9.67
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.05100.45 ▼10.2745.01 ▼2.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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)
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
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\PHPUnitPolyfills\\TestCases\\TestCase' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/Tests/Response/ErrorTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\PHPUnitPolyfills\\TestCases\\TestCase' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/Tests/LibraryTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Yedpay\\Client' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/examples/ExamplePrecreateClient.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Yedpay\\Curl\\HttpRequest' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/src/Curl/Request.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\PHPUnitPolyfills\\TestCases\\TestCase' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/Tests/ClientTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Yedpay\\Client' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/examples/ExampleOnlinePaymentClient.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Yedpay\\Response\\Response' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/src/Response/Success.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Yedpay\\Response\\Response' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/src/Response/Error.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\PHPUnitPolyfills\\TestCases\\TestCase' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/Tests/CurlTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Yedpay\\Client' not found in wp-content/plugins/yedpay-for-woocommerce/vendor/yedpay/php-library/examples/ExampleRefundClient.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

yedpay-for-woocommerce/index.php 77% from 13 tests

The entry point to "Yedpay for WooCommerce" version 1.1.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("yedpay-for-woocommerce.php" instead of "index.php")

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
No dangerous file extensions were detected4,218 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP306059713,130
PO File3189189468
Markdown21140269
SVG900140
JSON20093
YAML3111166
Dockerfile16028
XML10024

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.83
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods282
▷ Static methods186.38%
▷ Public methods26493.62%
▷ Protected methods124.26%
▷ Private methods62.13%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants35
▷ Global constants00.00%
▷ Class constants35100.00%
▷ Public constants35100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected