10% alientech-real-time-analytics

Code Review | Alientech Stats

WordPress plugin Alientech Stats scored 10% from 54 tests.

About plugin

  • Plugin page: alientech-real-ti...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-4.5.1
  • WordPress version: 5.8.1
  • First release: May 11, 2016
  • Latest release: May 16, 2016
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: df777 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 777 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/alientech-real-time-analytics/alientech.php+1126
    Methods with the same name as their class will not be constructors in a future version of PHP; alientech_SUPPORT has a deprecated constructor

Server metrics [RAM: ▼1.60MB] [CPU: ▼188.12ms] Passed 4 tests

Analyzing server-side resources used by Alientech Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼0.805.42 ▼32.08
Dashboard /wp-admin2.05 ▼1.015.94 ▼39.13
Posts /wp-admin/edit.php2.05 ▼1.065.49 ▼39.92
Add New Post /wp-admin/post-new.php2.05 ▼3.385.58 ▼641.36
Media Library /wp-admin/upload.php2.05 ▼0.955.49 ▼27.19
Alientech /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php2.055.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 2 new options
New WordPress options
widget_alientech_stats
widget_alientech_support

Browser metrics Passed 4 tests

Checking browser requirements for Alientech Stats
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,917 ▲32116.43 ▲0.8710.59 ▼1.4850.66 ▲3.14
Dashboard /wp-admin3,190 ▲2596.02 ▼0.10152.89 ▼2.05111.84 ▲2.49
Posts /wp-admin/edit.php2,760 ▲212.72 ▲0.0064.48 ▼9.5888.59 ▲2.79
Add New Post /wp-admin/post-new.php1,627 ▲1221.54 ▲0.12323.88 ▼43.39112.97 ▲7.62
Media Library /wp-admin/upload.php1,826 ▲195.00 ▼0.02159.83 ▼6.26110.54 ▼10.86
Alientech /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php1,2072.2175.2576.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/alientech-real-time-analytics/alientech.php+1126
    Methods with the same name as their class will not be constructors in a future version of PHP; alientech_SUPPORT has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_alientech_support
    • widget_alientech_stats

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Deprecated in wp-content/plugins/alientech-real-time-analytics/alientech.php+1126
    Methods with the same name as their class will not be constructors in a future version of PHP; alientech_SUPPORT has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Deprecated in wp-content/plugins/alientech-real-time-analytics/alientech.php+1299
    Methods with the same name as their class will not be constructors in a future version of PHP; alientech_STATS has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+286
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+287
    Undefined index: wgl
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+289
    Undefined index: tkn
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+291
    Undefined index: iga
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+293
    Undefined index: allowchat
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+295
    Undefined index: xtheme
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+297
    Undefined index: stats
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+299
    Undefined index: wpmap
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+300
    Undefined index: wpdash
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+328
    Undefined index: code
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+351
    Undefined index: action
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+260
    Undefined index: hitmagic
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Deprecated in wp-content/plugins/alientech-real-time-analytics/alientech.php+1535
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in alientech_SUPPORT is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in alientech_STATS is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+382
    Undefined variable: saved
    • > GET request to /wp-admin/options-general.php?page=alientech-real-time-analytics/alientech.php
    • > Notice in wp-content/plugins/alientech-real-time-analytics/alientech.php+431
    Undefined variable: hcresult

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alientech-real-time-analytics/alientech.php:12

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: heatmap, statistics, live, stats, alientech...

alientech-real-time-analytics/alientech.php 92% from 13 tests

The main PHP script in "Alientech Stats" version 1.01 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alientech-real-time-analytics.php" instead of "alientech.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected805 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP165892805

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity34.00
▷ Minimum class complexity13.00
▷ Maximum class complexity55.00
Average method complexity7.60
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
favicon.png4.56KB1.94KB▼ 57.33%