88% tiresias

Code Review | Tiresias - Recommendation Engine for WooCommerce

WordPress plugin Tiresias - Recommendation Engine for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: tiresias
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.3.1
  • WordPress version: 5.8.1
  • First release: Mar 11, 2016
  • Latest release: Mar 11, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ysilvela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 412 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Tiresias - Recommendation Engine for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1247.04 ▲21.37
Dashboard /wp-admin3.06 ▲0.0047.77 ▼0.35
Posts /wp-admin/edit.php3.11 ▲0.0051.64 ▲0.87
Add New Post /wp-admin/post-new.php5.42 ▼0.0291.91 ▼566.51
Media Library /wp-admin/upload.php3.00 ▲0.0036.76 ▲2.20

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Tiresias - Recommendation Engine for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,677 ▲10515.88 ▲0.419.32 ▼1.4047.55 ▼6.08
Dashboard /wp-admin2,970 ▲395.88 ▼0.30145.80 ▼5.43121.79 ▲3.24
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0166.48 ▼1.3991.71 ▼9.67
Add New Post /wp-admin/post-new.php1,500 ▼2,18718.76 ▲3.66400.37 ▼73.27112.47 ▼1.22
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.01156.18 ▼8.98126.75 ▼5.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tiresias/templates/order-tagging.php
    • > /wp-content/plugins/tiresias/templates/tiresias-elements.php
    • > /wp-content/plugins/tiresias/templates/customer-tagging.php
    • > /wp-content/plugins/tiresias/templates/product-tagging.php
    • > /wp-content/plugins/tiresias/templates/category-tagging.php
    • > /wp-content/plugins/tiresias/templates/cart-tagging.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tiresias/templates/widget-tiresias-element-options.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/tiresias/classes/class-wc-integration-tiresias-tagging.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tiresias/classes/class-wp-widget-tiresias-element.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiresias/woocommerce-tiresias-tagging.php:928

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: tiresias tagging, personalization, woocommerce, ecommerce, recommendations...

tiresias/woocommerce-tiresias-tagging.php 92% from 13 tests

The primary PHP file in "Tiresias - Recommendation Engine for WooCommerce" version 0.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tiresias.php" instead of "woocommerce-tiresias-tagging.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected794 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11153647792
JavaScript1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity29.00
▷ Minimum class complexity5.00
▷ Maximum class complexity86.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods50
▷ Static methods36.00%
▷ Public methods3876.00%
▷ Protected methods1122.00%
▷ Private methods12.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin