78% analytics-enabler

Code Review | Analytics Enabler

WordPress plugin Analytics Enabler scored78%from 54 tests.

About plugin

  • Plugin page: analytics-enabler
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2013
  • Latest release: Mar 28, 2013
  • Number of updates: 15
  • Update frequency: every 0.3 days
  • Top authors: bstaruk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,194 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Analytics Enabler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.81 ▼7.26
Dashboard /wp-admin3.33 ▼0.0248.20 ▼13.17
Posts /wp-admin/edit.php3.38 ▲0.0247.65 ▼5.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.39 ▼6.91
Media Library /wp-admin/upload.php3.25 ▲0.0240.72 ▲1.89
Analytics Enabler /wp-admin/options-general.php?page=analytics_settings_admin3.1933.68

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/analytics-enabler/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Analytics Enabler
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲4814.48 ▼0.271.69 ▼0.2640.76 ▼1.83
Dashboard /wp-admin2,225 ▲185.86 ▲0.90102.05 ▼8.1740.74 ▼2.27
Posts /wp-admin/edit.php2,101 ▼22.05 ▲0.0639.26 ▼1.0936.26 ▲0.65
Add New Post /wp-admin/post-new.php1,534 ▼1123.15 ▲0.01641.89 ▼55.4956.26 ▼9.44
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.06102.36 ▼6.8747.96 ▲3.82
Analytics Enabler /wp-admin/options-general.php?page=analytics_settings_admin7972.0525.2637.00

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=analytics_settings_admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=analytics_settings_admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/analytics-enabler/Analytics-Enabler.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: analytics, google analytics

analytics-enabler/Analytics-Enabler.php 92% from 13 tests

The main PHP file in "Analytics Enabler" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("analytics-enabler.php" instead of "Analytics-Enabler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin110 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11811110

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin