78% eduadmin-booking-klarna-checkout

Code Review | EduAdmin - Klarna Checkout WordPress-plugin

WordPress plugin EduAdmin - Klarna Checkout WordPress-plugin scored 78% from 54 tests.

About plugin

  • Plugin page: eduadmin-booking-...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: Mar 4, 2020
  • Number of updates: 16
  • Update frequency: every 43.4 days
  • Top authors: mnchga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by EduAdmin - Klarna Checkout WordPress-plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.65 ▼2.19
Dashboard /wp-admin3.31 ▲0.0044.08 ▼3.74
Posts /wp-admin/edit.php3.36 ▲0.0047.80 ▲1.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.82 ▼0.87
Media Library /wp-admin/upload.php3.23 ▲0.0037.08 ▲5.42

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for EduAdmin - Klarna Checkout WordPress-plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.551.59 ▼0.2736.81 ▼7.28
Dashboard /wp-admin2,206 ▲204.83 ▼0.17106.95 ▼7.8338.53 ▼3.55
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.0538.46 ▼5.7332.49 ▼3.99
Add New Post /wp-admin/post-new.php1,514 ▼617.49 ▼6.02648.96 ▼16.9455.96 ▼0.61
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0399.49 ▼2.3745.02 ▼0.37

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/eduadmin-booking-klarna-checkout/class-edu-klarnacheckout.php
    • > /wp-content/plugins/eduadmin-booking-klarna-checkout/eduadmin-wp-klarna-checkout.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Klarna_Checkout_Resource' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/RecurringOrder.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Klarna_Checkout_Exception' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/ApiErrorException.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Klarna_Checkout_Exception' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/ConnectorException.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Klarna_Checkout_Resource' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/RecurringStatus.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'Klarna_Checkout_ConnectorInterface' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/BasicConnector.php:41
    • > PHP Fatal error
      Uncaught Error: Interface 'Klarna_Checkout_HTTP_CURLHandleInterface' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/HTTP/CURLHandle.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Klarna_Checkout_Resource' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/Order.php:41
    • > PHP Fatal error
      Uncaught Error: Interface 'Klarna_Checkout_ResourceInterface' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/Resource.php:41
    • > PHP Fatal error
      Uncaught Error: Interface 'Klarna_Checkout_HTTP_TransportInterface' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/HTTP/CURLTransport.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Klarna_Checkout_Exception' not found in wp-content/plugins/eduadmin-booking-klarna-checkout/klarna_kco_php_4.0.0/src/Klarna/Checkout/ConnectionErrorException.php:40

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: events, lega online, courses, klarna, eduadmin...

eduadmin-booking-klarna-checkout/eduadmin-wp-klarna-checkout.php 85% from 13 tests

The principal PHP file in "EduAdmin - Klarna Checkout WordPress-plugin" v. 1.4.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("eduadmin-booking-klarna-checkout.php" instead of "eduadmin-wp-klarna-checkout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,165 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP292771,8491,114
Markdown127051

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.93
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes15.00%
Methods105
▷ Static methods21.90%
▷ Public methods9893.33%
▷ Protected methods76.67%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.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
PNG images were not found in this plugin