84% local-google-analytics

Code Review | Local Google Analytics

WordPress plugin Local Google Analytics scored84%from 54 tests.

About plugin

  • Plugin page: local-google-anal...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.3-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Jan 11, 2018
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: frickemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.18ms] Passed 4 tests

Server-side resources used by Local Google Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.56 ▼4.48
Dashboard /wp-admin3.33 ▲0.0243.75 ▼8.39
Posts /wp-admin/edit.php3.38 ▲0.0246.63 ▼1.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0180.93 ▼22.27
Media Library /wp-admin/upload.php3.25 ▲0.0235.94 ▲0.19
Local Google Analytics /wp-admin/options-general.php?page=galh3.29183.51

Server storage [IO: ▲0.06MB] [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: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Local Google Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.19 ▼1.111.65 ▼0.3638.39 ▼6.60
Dashboard /wp-admin2,210 ▲254.85 ▼0.01111.40 ▲9.8342.48 ▲0.85
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0440.69 ▼0.7537.92 ▲4.53
Add New Post /wp-admin/post-new.php1,536 ▲1323.41 ▲0.32643.23 ▼35.6653.61 ▼2.39
Media Library /wp-admin/upload.php1,389 ▲14.21 ▼0.1196.82 ▼3.9640.57 ▼3.74
Local Google Analytics /wp-admin/options-general.php?page=galh8372.0522.2727.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/local-google-analytics/ga-local-hosting.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

local-google-analytics/ga-local-hosting.php 92% from 13 tests

The primary PHP file in "Local Google Analytics" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("local-google-analytics.php" instead of "ga-local-hosting.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
Everything looks great! No dangerous files found in this plugin193 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22228101
JavaScript11392

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
No PNG files were detected