83% attributio-unblock-analytics

Code Review | Attributio Unblock Analytics

WordPress plugin Attributio Unblock Analytics scored83%from 54 tests.

About plugin

  • Plugin page: attributio-unbloc...
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 19, 2018
  • Latest release: Sep 30, 2018
  • Number of updates: 7
  • Update frequency: every 14.6 days
  • Top authors: attributio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /617 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.45ms] Passed 4 tests

This is a short check of server-side resources used by Attributio Unblock Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.74 ▼3.93
Dashboard /wp-admin3.33 ▲0.0344.11 ▼3.97
Posts /wp-admin/edit.php3.38 ▲0.0345.73 ▼0.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.88 ▼1.68
Media Library /wp-admin/upload.php3.26 ▲0.0337.01 ▲1.38

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Attributio Unblock Analytics: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲7513.76 ▼0.631.99 ▼0.2740.57 ▼5.82
Dashboard /wp-admin2,222 ▲374.88 ▼0.97110.35 ▲7.6942.34 ▲0.89
Posts /wp-admin/edit.php2,108 ▲161.99 ▼0.0639.88 ▼0.7234.94 ▼3.86
Add New Post /wp-admin/post-new.php1,546 ▲2723.01 ▼0.26577.44 ▼108.9255.01 ▲3.24
Media Library /wp-admin/upload.php1,404 ▲134.22 ▲0.0197.41 ▼0.6041.54 ▼6.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/attributio-unblock-analytics/templates/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires at least: Invalid plugin version format
The official readme.txt might help

attributio-unblock-analytics/attributio-unblock.php 85% from 13 tests

"Attributio Unblock Analytics" version 0.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("attributio-unblock-analytics.php" instead of "attributio-unblock.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 224 characters long)

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
Success! There were no dangerous files found in this plugin258 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34115180
JavaScript24078

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin