83% oribi-analytics-for-woocommerce

Code Review | Oribi Analytics for WooCommerce

WordPress plugin Oribi Analytics for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: oribi-analytics-f...
  • Plugin version: 1.8.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.8.2
  • WordPress version: 5.9.2
  • First release: Jun 10, 2020
  • Latest release: Jan 18, 2022
  • Number of updates: 20
  • Update frequency: every 29.4 days
  • Top authors: oribi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 5,380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼298.71ms] Passed 4 tests

An overview of server-side resources used by Oribi Analytics for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0952.93 ▲0.63
Dashboard /wp-admin3.48 ▲0.0733.95 ▼3.04
Posts /wp-admin/edit.php3.70 ▲0.0636.62 ▼14.79
Add New Post /wp-admin/post-new.php6.94 ▼0.03102.15 ▼1,174.96
Media Library /wp-admin/upload.php3.35 ▲0.0623.34 ▼2.05
Oribi Analytics /wp-admin/options-general.php?page=oribi3.3322.18

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options
oribi_tracking_capabilities
oribi_snippet

Browser metrics Passed 4 tests

Oribi Analytics for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲6616.44 ▲0.467.21 ▼0.172.43 ▼0.13
Dashboard /wp-admin2,901 ▲476.12 ▼0.09117.31 ▼16.60159.52 ▼9.89
Posts /wp-admin/edit.php2,670 ▼243.25 ▲0.0165.26 ▼7.08147.04 ▼1.96
Add New Post /wp-admin/post-new.php1,670 ▼8216.19 ▼5.09411.35 ▼57.75165.92 ▲7.72
Media Library /wp-admin/upload.php1,711 ▲135.67 ▲0.16133.49 ▼12.64186.78 ▼7.52
Oribi Analytics /wp-admin/options-general.php?page=oribi1,1992.5555.00138.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 2 options
    • oribi_snippet
    • oribi_tracking_capabilities

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oribi-analytics-for-woocommerce/inc/oribi-admin-settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: tracking, analytics, ecommerce, google-analytics, insights

oribi-analytics-for-woocommerce/oribi-analytics-ecommerce.php 77% from 13 tests

The entry point to "Oribi Analytics for WooCommerce" version 1.8.8 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "2.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("oribi-analytics-for-woocommerce.php" instead of "oribi-analytics-ecommerce.php")
  • 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

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
Everything looks great! No dangerous files found in this plugin485 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25618309
CSS1260151
SVG10025

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin