84% aon-google-analytics

Code Review | AON Google Analytics

WordPress plugin AON Google Analytics scored84%from 54 tests.

About plugin

  • Plugin page: aon-google-analytics
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2020
  • Latest release: Jul 13, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Aaron140 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by AON Google Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.56 ▲2.02
Dashboard /wp-admin3.32 ▲0.0251.90 ▼8.18
Posts /wp-admin/edit.php3.37 ▲0.0249.75 ▲0.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.17 ▼10.23
Media Library /wp-admin/upload.php3.24 ▲0.0240.24 ▲3.00
AON Google Analytics /wp-admin/tools.php?page=aon-google-analytics3.2129.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for AON Google Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.271.65 ▼0.0241.18 ▼0.04
Dashboard /wp-admin2,210 ▲194.82 ▼0.05101.04 ▼3.6639.21 ▼7.44
Posts /wp-admin/edit.php2,090 ▲12.02 ▲0.0336.56 ▼5.6131.79 ▼6.50
Add New Post /wp-admin/post-new.php1,540 ▲123.20 ▼0.25659.20 ▼12.2056.34 ▼1.09
Media Library /wp-admin/upload.php1,392 ▲74.22 ▼0.01101.50 ▼15.4444.50 ▼1.94
AON Google Analytics /wp-admin/tools.php?page=aon-google-analytics7802.0325.9527.42

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aon-google-analytics/aon-google-analytics.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: google, google analytics, analytics, code, tracking

aon-google-analytics/aon-google-analytics.php Passed 13 tests

Analyzing the main PHP file in "AON Google Analytics" version 1.0
111 characters long description:
Simply put, this is the easiest way to implement Google Analytics tracking on your website. No hassle, no fuss.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin125 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24168125

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin