99% xstream-google-analytics

Code Review | Xstream Google Analytics for WordPress

WordPress plugin Xstream Google Analytics for WordPress scored 99% from 54 tests.

About plugin

  • Plugin page: xstream-google-an...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-4.8.1
  • WordPress version: 5.8.1
  • First release: Aug 5, 2017
  • Latest release: Aug 5, 2017
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: xstreamthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 626 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Xstream Google Analytics for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.51 ▼7.63
Dashboard /wp-admin3.07 ▲0.0156.98 ▲4.09
Posts /wp-admin/edit.php3.12 ▲0.0147.64 ▼6.07
Add New Post /wp-admin/post-new.php5.42 ▼0.0198.36 ▼772.05
Media Library /wp-admin/upload.php3.01 ▲0.0145.29 ▲3.32
Xstream Analytics /wp-admin/options-general.php?page=xstream-ga2.9832.20

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Xstream Google Analytics for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,706 ▲11015.55 ▼0.0114.29 ▲4.5249.71 ▼5.60
Dashboard /wp-admin2,978 ▲445.88 ▼0.02138.85 ▼44.28125.80 ▼30.28
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0274.99 ▼13.09101.77 ▼40.58
Add New Post /wp-admin/post-new.php1,686 ▲7118.71 ▼2.58397.71 ▲20.29140.67 ▲6.51
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.02171.69 ▼14.65126.16 ▼23.49
Xstream Analytics /wp-admin/options-general.php?page=xstream-ga1,0612.0968.5986.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
These attributes need your attention: You can take inspiration from this readme.txt

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

The entry point to "Xstream Google Analytics for WordPress" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xstream-google-analytics.php" instead of "xstream-ga.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23129125
JavaScript13889

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin