84% oometrics

Code Review | WooCommerce Analytics, Chat and CRM - OOMetrics

WordPress plugin WooCommerce Analytics, Chat and CRM - OOMetrics scored84%from 54 tests.

About plugin

  • Plugin page: oometrics
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 12, 2019
  • Latest release: Jan 2, 2023
  • Number of updates: 37
  • Update frequency: every 30.2 days
  • Top authors: oometrics (91.89%)arashsafari (10.81%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by WooCommerce Analytics, Chat and CRM - OOMetrics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.28 ▼1.24
Dashboard /wp-admin3.31 ▲0.0047.03 ▼3.60
Posts /wp-admin/edit.php3.36 ▲0.0051.30 ▲4.57
Add New Post /wp-admin/post-new.php5.89 ▲0.00101.47 ▲6.23
Media Library /wp-admin/upload.php3.23 ▲0.0034.20 ▲1.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Analytics, Chat and CRM - OOMetrics: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.141.54 ▼0.3541.30 ▼6.21
Dashboard /wp-admin2,203 ▲155.80 ▼0.26103.85 ▼13.5039.77 ▼10.10
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0339.57 ▲1.7835.06 ▼6.70
Add New Post /wp-admin/post-new.php1,514 ▼517.62 ▼5.51677.91 ▲64.0774.31 ▲17.74
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.1395.16 ▼3.6641.48 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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 fix the following
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OOReport' not found in wp-content/plugins/oometrics/templates/reports/info/header.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OOReport' not found in wp-content/plugins/oometrics/templates/reports/chats/profile-info.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/oometrics/templates/debug.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/oometrics/oometrics.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/oometrics/templates/reports/dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/oometrics/templates/dashboard/sidebar/header.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/oometrics/templates/dashboard/sidebar/body.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/oometrics/templates/reports/sidebar/body.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/oometrics/inc/Fixtures/Exclusions.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/oometrics/templates/dashboard/chats/profile-info.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires php: Invalid plugin version format
The official readme.txt might help

oometrics/oometrics.php 92% from 13 tests

The main PHP file in "WooCommerce Analytics, Chat and CRM - OOMetrics" ver. 1.4.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)

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
No dangerous file extensions were detected11,085 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP369151,0326,898
JavaScript5260552,200
PO File21,0331,9451,071
CSS311333720
SVG706196

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity37.33
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods209
▷ Static methods104.78%
▷ Public methods19693.78%
▷ Protected methods20.96%
▷ Private methods115.26%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants1967.86%
▷ Class constants932.14%
▷ Public constants9100.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