84% theux-analytics

Code Review | TheUx Analytics

WordPress plugin TheUx Analytics scored 84% from 54 tests.

About plugin

  • Plugin page: theux-analytics
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.6
  • WordPress version: 6.3.1
  • First release: Jul 30, 2013
  • Latest release: Jul 31, 2013
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: zilli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 722 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 gracefully, with no errors

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

This is a short check of server-side resources used by TheUx Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.89 ▼2.75
Dashboard /wp-admin3.31 ▲0.0143.21 ▼21.35
Posts /wp-admin/edit.php3.36 ▲0.0144.01 ▼0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.06 ▼0.97
Media Library /wp-admin/upload.php3.24 ▲0.0133.42 ▼5.27
Google Analytics /wp-admin/options-general.php?page=tua3.1828.30

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

TheUx Analytics: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.24 ▼1.144.58 ▲2.5544.48 ▼5.51
Dashboard /wp-admin2,210 ▲225.86 ▼0.01100.71 ▼14.2839.21 ▼6.80
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0238.55 ▲1.6131.43 ▼2.66
Add New Post /wp-admin/post-new.php1,536 ▼623.36 ▲5.23625.66 ▲11.1250.35 ▼2.28
Media Library /wp-admin/upload.php1,392 ▲104.27 ▼0.0398.10 ▼1.4041.85 ▼5.57
Google Analytics /wp-admin/options-general.php?page=tua8042.0223.8626.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=tua
    • > 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=tua
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tua
    • > Notice in wp-content/plugins/theux-analytics/theux-analytics.php+126
    Trying to access array offset on value of type bool

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: google, google analytics

theux-analytics/theux-analytics.php 92% from 13 tests

The primary PHP file in "TheUx Analytics" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2418067

PHP code Passed 2 tests

A short 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.20
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin