84% admitad-tracking

Code Review | Admitad Tracking

WordPress plugin Admitad Tracking scored84%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: 6.3.1
  • 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

80+ active /3,775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.46ms] Passed 4 tests

Analyzing server-side resources used by Admitad Tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.05 ▲4.03
Dashboard /wp-admin3.36 ▲0.0643.31 ▼8.08
Posts /wp-admin/edit.php3.47 ▲0.1247.85 ▲4.67
Add New Post /wp-admin/post-new.php5.94 ▲0.0683.26 ▼11.89
Media Library /wp-admin/upload.php3.28 ▲0.0636.49 ▲2.12
Admitad tracking /wp-admin/options-general.php?page=admitadtracking3.2530.03

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admitad Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.26 ▼1.171.78 ▲0.0343.06 ▼0.57
Dashboard /wp-admin2,210 ▲225.89 ▲1.05104.00 ▼16.5038.51 ▼4.09
Posts /wp-admin/edit.php2,090 ▲42.01 ▼0.0035.82 ▼0.6533.31 ▼3.13
Add New Post /wp-admin/post-new.php1,533 ▲1423.21 ▲2.09618.99 ▼25.9653.98 ▲2.59
Media Library /wp-admin/upload.php1,395 ▲74.22 ▲0.1097.25 ▼2.8642.83 ▼1.05
Admitad tracking /wp-admin/options-general.php?page=admitadtracking8032.0624.3725.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
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/ActionsTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Admitad\\Tab\\Tab' not found in wp-content/plugins/admitad-tracking/src/Admitad/Tab/MainTab.php:7
    • > 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/RevisionTab.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

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: admitad, integration

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

The primary PHP file in "Admitad Tracking" version 1.0.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("admitad-tracking.php" instead of "admitadtracking.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous 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 is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin