10% iq-inhead-analytics

Code Review | IQ Analytics Tracking Code In Head

WordPress plugin IQ Analytics Tracking Code In Head scored10%from 54 tests.

About plugin

  • Plugin page: iq-inhead-analytics
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2016
  • Latest release: Mar 26, 2016
  • Number of updates: 17
  • Update frequency: every 0.1 days
  • Top authors: omnileads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /848 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/iq-inhead-analytics/includes/load.php+17
    Use of undefined constant IQA_ABSPATH - assumed 'IQA_ABSPATH' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.52ms] Passed 4 tests

An overview of server-side resources used by IQ Analytics Tracking Code In Head
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.95 ▼37.42
Dashboard /wp-admin2.05 ▼1.265.65 ▼49.82
Posts /wp-admin/edit.php2.05 ▼1.316.55 ▼42.72
Add New Post /wp-admin/post-new.php2.05 ▼3.845.47 ▼88.11
Media Library /wp-admin/upload.php2.05 ▼1.185.64 ▼31.81
IQ Analytics /wp-admin/options-general.php?page=iq-inhead-analytics2.055.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by IQ Analytics Tracking Code In Head
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4314.33 ▼0.192.19 ▲0.2340.85 ▲0.94
Dashboard /wp-admin2,199 ▲255.59 ▼0.0284.60 ▼26.7543.43 ▲0.54
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0840.09 ▲1.6836.70 ▲3.01
Add New Post /wp-admin/post-new.php1,531 ▼423.38 ▲5.28664.17 ▲5.5360.49 ▼2.56
Media Library /wp-admin/upload.php1,407 ▲44.25 ▲0.0695.20 ▼10.8743.66 ▼1.52
IQ Analytics /wp-admin/options-general.php?page=iq-inhead-analytics8242.0323.8826.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/iq-inhead-analytics/includes/load.php+17
    Use of undefined constant IQA_ABSPATH - assumed 'IQA_ABSPATH' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=iq-inhead-analytics
    • > Warning in wp-content/plugins/iq-inhead-analytics/includes/load.php+17
    Use of undefined constant IQA_ABSPATH - assumed 'IQA_ABSPATH' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=iq-inhead-analytics
    • > Warning in wp-includes/option.php+2467
    Illegal offset type

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 take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/iq-inhead-analytics/settings.ctp.php
    • > /wp-content/plugins/iq-inhead-analytics/iq-inhead-analytics.php
    • > /wp-content/plugins/iq-inhead-analytics/includes/load.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Analytics tracking script inline in head.
    ), #2 (Plugin options page for visibility options and adding your tracking code.
    )
The official readme.txt is a good inspiration

iq-inhead-analytics/iq-inhead-analytics.php Passed 13 tests

The primary PHP file in "IQ Analytics Tracking Code In Head" version 0.2.1 is used by WordPress to initiate all plugin functionality
55 characters long description:
Copy and paste your Analytics tracking code. Thats all.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin166 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP65147166

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.00
▷ Minimum class complexity6.00
▷ Maximum class complexity8.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png34.00KB17.22KB▼ 49.34%
screenshot-1.png43.58KB19.07KB▼ 56.23%