94% admitad-tracking

Code Review | Admitad Tracking

WordPress plugin Admitad Tracking scored 94% from 54 tests.

About plugin

  • Plugin page: admitad-tracking
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 5.9.2
  • First release: Oct 10, 2017
  • Latest release: Dec 17, 2018
  • Number of updates: 11
  • Update frequency: every 39.5 days
  • Top authors: admitad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,199 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼291.92ms] Passed 4 tests

An overview of server-side resources used by Admitad Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.5653.59 ▲25.65
Dashboard /wp-admin3.65 ▲0.2436.40 ▲3.68
Posts /wp-admin/edit.php3.88 ▲0.2341.62 ▲2.96
Add New Post /wp-admin/post-new.php7.18 ▲0.2094.97 ▼1,178.93
Media Library /wp-admin/upload.php3.60 ▲0.3028.76 ▲4.63
Admitad tracking /wp-admin/options-general.php?page=admitadtracking3.5726.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Admitad Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1416.21 ▲0.306.01 ▼0.332.44 ▲0.26
Dashboard /wp-admin2,897 ▲366.18 ▼0.08118.50 ▼18.57156.72 ▼3.21
Posts /wp-admin/edit.php2,662 ▼293.24 ▼0.0065.58 ▲2.18140.24 ▼2.02
Add New Post /wp-admin/post-new.php1,755 ▲4421.57 ▲0.04453.71 ▲19.73159.89 ▼2.14
Media Library /wp-admin/upload.php1,703 ▲25.53 ▲0.01139.10 ▼1.60184.14 ▼3.74
Admitad tracking /wp-admin/options-general.php?page=admitadtracking1,0372.5053.05124.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Admitad\\Tab\\Tab' not found in wp-content/plugins/admitad-tracking/src/Admitad/Tab/RevisionTab.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Admitad\\Tab\\Tab' not found in wp-content/plugins/admitad-tracking/src/Admitad/Tab/ActionsTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Admitad\\Tab\\Tab' not found in wp-content/plugins/admitad-tracking/src/Admitad/Tab/AuthTab.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Admitad\\Tab\\Tab' not found in wp-content/plugins/admitad-tracking/src/Admitad/Tab/MainTab.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: integration, admitad

admitad-tracking/admitadtracking.php 85% from 13 tests

"Admitad Tracking" version 1.0.7'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 ("admitad-tracking.php" instead of "admitadtracking.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,491 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP153772431,429
PO File1253062

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.93
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods123
▷ Static methods00.00%
▷ Public methods8367.48%
▷ Protected methods3730.08%
▷ Private methods32.44%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin