84% oribi-analytics

Code Review | Oribi Analytics

WordPress plugin Oribi Analytics scored 84% from 54 tests.

About plugin

  • Plugin page: oribi-analytics
  • Plugin version: 3.6.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Sep 18, 2019
  • Latest release: Jan 18, 2022
  • Number of updates: 27
  • Update frequency: every 31.6 days
  • Top authors: oribi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

3,000+ active / 27,036 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼296.82ms] Passed 4 tests

Analyzing server-side resources used by Oribi Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1054.67 ▲1.19
Dashboard /wp-admin3.48 ▲0.0833.32 ▲1.93
Posts /wp-admin/edit.php3.71 ▲0.0739.13 ▲2.85
Add New Post /wp-admin/post-new.php6.95 ▼0.0291.35 ▼1,193.22
Media Library /wp-admin/upload.php3.36 ▲0.0726.41 ▲2.82
Oribi Analytics /wp-admin/options-general.php?page=oribi3.3422.26

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

A short overview of filesystem and database impact
This plugin was 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

Checking browser requirements for Oribi Analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,778 ▲2415.91 ▲0.135.71 ▼1.352.22 ▼0.80
Dashboard /wp-admin2,905 ▲546.18 ▼0.09116.87 ▼21.95159.03 ▼2.22
Posts /wp-admin/edit.php2,701 ▲73.25 ▼0.0064.80 ▼1.30140.41 ▼2.21
Add New Post /wp-admin/post-new.php1,769 ▲10822.42 ▲6.00415.43 ▲8.31160.00 ▲1.18
Media Library /wp-admin/upload.php1,711 ▲105.57 ▲0.04157.67 ▲14.73201.15 ▲12.16
Oribi Analytics /wp-admin/options-general.php?page=oribi1,2482.4154.00135.22

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • oribi_tracking_capabilities
    • oribi_snippet

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× 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/inc/oribi-admin-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/oribi-analytics/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: tracking, ecommerce, analytics, google-analytics, insights

oribi-analytics/index.php 85% from 13 tests

The primary PHP file in "Oribi Analytics" version 3.6.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("oribi-analytics.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin493 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25716320
CSS1250148
SVG10025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity17.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
No PNG files were detected