89% chroma-google-analytics

Code Review | Chroma Google Analytics

WordPress plugin Chroma Google Analytics scored 89% from 54 tests.

About plugin

  • Plugin page: chroma-google-ana...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: Aug 27, 2017
  • Number of updates: 23
  • Update frequency: every 5.2 days
  • Top authors: soojooko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 867 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.04MB] [CPU: ▼0.76ms] Passed 4 tests

An overview of server-side resources used by Chroma Google Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.40 ▲2.43
Dashboard /wp-admin3.35 ▲0.0548.55 ▲1.27
Posts /wp-admin/edit.php3.40 ▲0.0446.84 ▲2.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.14 ▼8.27
Media Library /wp-admin/upload.php3.27 ▲0.0436.47 ▲1.92
Chroma Google Analytics /wp-admin/options-general.php?page=chroma_googleanalytics_settings3.2434.40

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
chroma_googleanalytics
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Chroma Google Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.141.67 ▼0.2545.35 ▼6.36
Dashboard /wp-admin2,210 ▲195.88 ▲0.7897.95 ▼4.0336.77 ▼8.41
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0036.15 ▲0.3233.98 ▲0.82
Add New Post /wp-admin/post-new.php1,533 ▼923.00 ▲4.65668.06 ▲37.3760.12 ▲3.91
Media Library /wp-admin/upload.php1,392 ▲104.17 ▼0.0491.48 ▼5.9340.37 ▼1.88
Chroma Google Analytics /wp-admin/options-general.php?page=chroma_googleanalytics_settings8822.1923.5134.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 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
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 just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: statistics, google, analytics, tracking

chroma-google-analytics/chroma_googleanalytics.php 85% from 13 tests

The primary PHP file in "Chroma Google Analytics" version 1.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("chroma-google-analytics.php" instead of "chroma_googleanalytics.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Success! There were no dangerous files found in this plugin526 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP9151180362
Sass211182
CSS11048
JavaScript48434

PHP code Passed 2 tests

Analyzing 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.27
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin