78% eduadmin-sveawebpay

Code Review | EduAdmin - SveaWebPay WordPress-plugin

WordPress plugin EduAdmin - SveaWebPay WordPress-plugin scored78%from 54 tests.

About plugin

  • Plugin page: eduadmin-sveawebpay
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 9, 2021
  • Latest release: Jun 2, 2022
  • Number of updates: 8
  • Update frequency: every 52.5 days
  • Top authors: mnchga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by EduAdmin - SveaWebPay WordPress-plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.08 ▼0.61
Dashboard /wp-admin3.31 ▲0.0047.86 ▼6.84
Posts /wp-admin/edit.php3.36 ▲0.0049.98 ▼1.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.35 ▼4.94
Media Library /wp-admin/upload.php3.23 ▲0.0038.20 ▼0.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EduAdmin - SveaWebPay WordPress-plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.30 ▼1.081.82 ▼0.0341.50 ▼5.67
Dashboard /wp-admin2,221 ▲215.86 ▼0.0197.91 ▼5.2642.28 ▲1.78
Posts /wp-admin/edit.php2,103 ▼02.06 ▲0.0244.67 ▲2.9535.46 ▲0.69
Add New Post /wp-admin/post-new.php1,531 ▲523.13 ▲5.60655.57 ▼15.5450.65 ▼6.07
Media Library /wp-admin/upload.php1,394 ▼34.24 ▲0.04100.17 ▼18.0942.25 ▼4.76

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
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/eduadmin-sveawebpay/eduadmin-wordpress-sveawebpay.php
    • > /wp-content/plugins/eduadmin-sveawebpay/class/class-edu-sveawebpay.php
  • 244× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\WebPay\\AdminService\\AdminServiceRequest' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/webpay/src/AdminService/UpdateOrderRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\Checkout\\Validation\\ValidationService' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/checkout/src/Validation/ValidateGetOrderData.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\Checkout\\Validation\\ValidationService' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/checkout/src/Validation/Admin/ValidateCancelOrderRowData.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\WebPay\\HostedService\\HostedRequest' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/webpay/src/HostedService/HostedAdminRequest/LowerTransaction.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\Checkout\\Validation\\ValidationService' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/checkout/src/Validation/Admin/ValidateAddOrderRowData.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\WebPay\\BuildOrder\\CheckoutAdminOrderBuilder' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/webpay/src/BuildOrder/QueryTaskInfoBuilder.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Svea\\WebPay\\WebService\\WebServiceResponse\\WebServiceResponse' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/sveaekonomi/webpay/src/WebService/WebServiceResponse/CreateOrderResponse.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/eduadmin-sveawebpay/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: events, svea, courses, eduadmin, booking...

eduadmin-sveawebpay/eduadmin-wordpress-sveawebpay.php 85% from 13 tests

Analyzing the main PHP file in "EduAdmin - SveaWebPay WordPress-plugin" version 3.0.1
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("eduadmin-sveawebpay.php" instead of "eduadmin-wordpress-sveawebpay.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected21,408 lines of code in 391 files:
LanguageFilesBlank linesComment linesLines of code
PHP3854,5719,99817,718
Markdown384503,308
JSON300382

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.73
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces53
Interfaces5
Traits0
Classes372
▷ Abstract classes164.30%
▷ Concrete classes35695.70%
▷ Final classes20.56%
Methods1,422
▷ Static methods14610.27%
▷ Public methods1,10077.36%
▷ Protected methods14510.20%
▷ Private methods17712.45%
Functions13
▷ Named functions430.77%
▷ Anonymous functions969.23%
Constants134
▷ Global constants10.75%
▷ Class constants13399.25%
▷ Public constants133100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin