84% metrilo-woocommerce-integration

Code Review | Metrilo - WooCommerce Growth Platform

WordPress plugin Metrilo - WooCommerce Growth Platform scored84%from 54 tests.

About plugin

  • Plugin page: metrilo-woocommer...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2014
  • Latest release: Jul 5, 2021
  • Number of updates: 93
  • Update frequency: every 26.7 days
  • Top authors: MurryIvanoff (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active /45,144 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.30ms] Passed 4 tests

An overview of server-side resources used by Metrilo - WooCommerce Growth Platform
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.77 ▼9.05
Dashboard /wp-admin3.32 ▲0.0144.29 ▼4.51
Posts /wp-admin/edit.php3.37 ▲0.0145.89 ▲0.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.91 ▼7.97
Media Library /wp-admin/upload.php3.24 ▲0.0133.39 ▼3.65

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Metrilo - WooCommerce Growth Platform
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.25 ▼1.131.67 ▼0.3241.95 ▼8.61
Dashboard /wp-admin2,206 ▲214.82 ▼0.10113.09 ▲12.5741.96 ▲4.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0340.77 ▲5.1635.87 ▲2.95
Add New Post /wp-admin/post-new.php1,535 ▲1623.28 ▼0.14593.09 ▼116.6058.00 ▲0.16
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0698.10 ▼19.2541.82 ▼5.44

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metrilo-woocommerce-integration/includes/render_identify.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/metrilo-woocommerce-integration/includes/integration.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metrilo-woocommerce-integration/includes/views/metrilo_import_view.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/metrilo-woocommerce-integration/includes/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metrilo-woocommerce-integration/includes/js.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metrilo-woocommerce-integration/includes/render_tracking_events.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metrilo-woocommerce-integration/includes/render_footer_tracking_events.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 37 tag instead of maximum 10
You can take inspiration from this readme.txt

metrilo-woocommerce-integration/metrilo-woocommerce-integration.php Passed 13 tests

The main file in "Metrilo - WooCommerce Growth Platform" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
One-click WooCommerce integration with Metrilo eCommerce Analytics

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,152 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP92901491,149
Markdown1103

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity68.67
▷ Minimum class complexity1.00
▷ Maximum class complexity203.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods82
▷ Static methods00.00%
▷ Public methods7490.24%
▷ Protected methods00.00%
▷ Private methods89.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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