84% insites-analytics

Code Review | inSites Analytics

WordPress plugin inSites Analytics scored84%from 54 tests.

About plugin

  • Plugin page: insites-analytics
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Sep 12, 2022
  • Latest release: Sep 19, 2022
  • Number of updates: 7
  • Update frequency: every 1.9 days
  • Top authors: insitesanalytics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /229 total downloads

Benchmarks

Plugin footprint 83% from 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.07MB] [CPU: ▼9.11ms] Passed 4 tests

Analyzing server-side resources used by inSites Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.77 ▼2.91
Dashboard /wp-admin3.38 ▲0.0350.17 ▼15.77
Posts /wp-admin/edit.php3.49 ▲0.1450.96 ▲0.24
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.17 ▼18.00
Media Library /wp-admin/upload.php3.30 ▲0.0739.52 ▲1.95

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by inSites Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲8014.73 ▲0.141.94 ▲0.0837.12 ▼3.98
Dashboard /wp-admin2,266 ▲895.57 ▼0.0085.66 ▼7.4137.27 ▼7.88
Posts /wp-admin/edit.php2,173 ▲732.01 ▲0.0336.99 ▼3.5734.16 ▲0.45
Add New Post /wp-admin/post-new.php1,542 ▲1623.20 ▼0.13661.91 ▼29.6159.41 ▲1.09
Media Library /wp-admin/upload.php1,474 ▲744.16 ▲0.09100.90 ▼16.0944.02 ▼4.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/insites-analytics/public/partials/insites-analytics-public-display.php
    • > /wp-content/plugins/insites-analytics/admin/partials/insites-analytics-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: stats, analytics, google analytics

insites-analytics/insites-analytics.php Passed 13 tests

The main file in "inSites Analytics" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
Website statistics, privacy compliant and with built-in carbon offsetting.

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
Good job! No executable or dangerous file extensions detected313 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12134510240
PO File1101043
SVG10014
CSS22810
JavaScript24546

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin