83% divvit-ecommerce-analytics

Code Review | Divvit e-commerce analytics

WordPress plugin Divvit e-commerce analytics scored83%from 54 tests.

About plugin

  • Plugin page: divvit-ecommerce-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 10, 2016
  • Latest release: Sep 21, 2017
  • Number of updates: 13
  • Update frequency: every 26.8 days
  • Top authors: divvit (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,360 total downloads

Benchmarks

Plugin footprint 82% 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.02MB] [CPU: ▼4.14ms] Passed 4 tests

This is a short check of server-side resources used by Divvit e-commerce analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.85 ▲1.79
Dashboard /wp-admin3.33 ▲0.0251.68 ▼3.82
Posts /wp-admin/edit.php3.38 ▲0.0248.10 ▼3.33
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.05 ▼11.08
Media Library /wp-admin/upload.php3.25 ▲0.0238.72 ▲1.67

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/divvit-ecommerce-analytics/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Divvit e-commerce analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.23 ▼1.141.67 ▼0.0743.85 ▲0.52
Dashboard /wp-admin2,221 ▲215.80 ▼0.06114.97 ▲9.9841.80 ▼4.72
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0234.05 ▼4.2436.58 ▲1.80
Add New Post /wp-admin/post-new.php1,545 ▲1923.19 ▲5.52669.48 ▲6.5756.27 ▲8.30
Media Library /wp-admin/upload.php1,400 ▲64.21 ▲0.0298.48 ▼9.4243.75 ▼1.95

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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 | 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/divvit-ecommerce-analytics/public/partials/divvit-tracking-public-display.php
    • > /wp-content/plugins/divvit-ecommerce-analytics/admin/partials/plugin-divvit-tracking-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
You can take inspiration from this readme.txt

divvit-ecommerce-analytics/divvit-tracking.php 85% from 13 tests

Analyzing the main PHP file in "Divvit e-commerce analytics" version 1.0.4
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("divvit-ecommerce-analytics.php" instead of "divvit-tracking.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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin330 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12109448327
JavaScript1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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