89% opentracker-analytics

Code Review | Opentracker Analytics

WordPress plugin Opentracker Analytics scored89%from 54 tests.

About plugin

  • Plugin page: opentracker-analy...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Jun 24, 2015
  • Latest release: Jul 9, 2018
  • Number of updates: 15
  • Update frequency: every 74.1 days
  • Top authors: Opentracker (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.14ms] Passed 4 tests

A check of server-side resources used by Opentracker Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.23 ▼1.31
Dashboard /wp-admin3.33 ▲0.0245.75 ▼3.63
Posts /wp-admin/edit.php3.38 ▲0.0247.44 ▼2.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.76 ▼1.60
Media Library /wp-admin/upload.php3.25 ▲0.0235.16 ▲0.89
Opentracker /wp-admin/options-general.php?page=opentracker3.2229.70

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

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

Browser metrics Passed 4 tests

Opentracker Analytics: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲3614.59 ▲0.222.00 ▲0.2044.97 ▲7.79
Dashboard /wp-admin2,193 ▲165.54 ▼0.0084.25 ▼3.1536.97 ▼5.55
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.1833.30 ▼3.5735.42 ▲2.07
Add New Post /wp-admin/post-new.php1,539 ▲1318.24 ▼5.18595.33 ▼112.0070.11 ▲15.87
Media Library /wp-admin/upload.php1,407 ▲104.16 ▲0.02100.88 ▲1.1143.84 ▼0.76
Opentracker /wp-admin/options-general.php?page=opentracker8151.9922.2226.70

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

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

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

opentracker-analytics/opentracker.php 85% from 13 tests

The main PHP script in "Opentracker Analytics" version 1.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("opentracker-analytics.php" instead of "opentracker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected118 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3524193
PO File15525

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.20MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png72.00KB19.85KB▼ 72.43%
assets/screenshot-2.png136.35KB37.11KB▼ 72.78%