90% logic-hop-google-analytics-add-on

Code Review | Logic Hop Google Analytics Add-on

WordPress plugin Logic Hop Google Analytics Add-on scored90%from 54 tests.

About plugin

  • Plugin page: logic-hop-google-...
  • Plugin version: 3.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Oct 21, 2018
  • Latest release: Feb 15, 2022
  • Number of updates: 11
  • Update frequency: every 110.3 days
  • Top authors: logichop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,071 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.53ms] Passed 4 tests

Server-side resources used by Logic Hop Google Analytics Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.49 ▼4.10
Dashboard /wp-admin3.38 ▲0.0845.96 ▼8.16
Posts /wp-admin/edit.php3.50 ▲0.1448.69 ▼2.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.21 ▼18.86
Media Library /wp-admin/upload.php3.31 ▲0.0842.16 ▲4.93

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

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

Browser metrics Passed 4 tests

Logic Hop Google Analytics Add-on: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.29 ▼0.891.75 ▼0.2538.92 ▼3.29
Dashboard /wp-admin2,237 ▲334.87 ▼1.02109.46 ▼1.0840.89 ▼4.10
Posts /wp-admin/edit.php2,116 ▲162.02 ▼0.0138.74 ▲2.6436.33 ▲2.23
Add New Post /wp-admin/post-new.php1,556 ▲1623.10 ▼0.19667.44 ▲12.6357.13 ▲0.03
Media Library /wp-admin/upload.php1,416 ▲164.25 ▲0.02111.64 ▲5.6347.96 ▲3.19

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: logic hop, personalized marketing, personalization, google analytics, personalized content

logic-hop-google-analytics-add-on/logichop_google_analytics.php 92% from 13 tests

The principal PHP file in "Logic Hop Google Analytics Add-on" v. 3.1.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("logic-hop-google-analytics-add-on.php" instead of "logichop_google_analytics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin367 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP263145343
JavaScript11014
CSS10010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity7.60
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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