88% ads-pixel

Code Review | Events Tracker

WordPress plugin Events Tracker scored 88% from 54 tests.

About plugin

  • Plugin page: ads-pixel
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.4
  • WordPress version: 5.9.2
  • First release: Jul 31, 2020
  • Latest release: Aug 1, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: muhfaris (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 215 total downloads

Benchmarks

Plugin footprint Passed 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: ▼292.99ms] Passed 4 tests

Server-side resources used by Events Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1354.41 ▼1.04
Dashboard /wp-admin3.48 ▲0.0835.24 ▼0.04
Posts /wp-admin/edit.php3.71 ▲0.0744.99 ▲8.02
Add New Post /wp-admin/post-new.php6.95 ▼0.0289.79 ▼1,161.37
Media Library /wp-admin/upload.php3.36 ▲0.0725.01 ▼9.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Events Tracker: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,933 ▲17916.54 ▲0.9121.45 ▲14.252.42 ▼0.38
Dashboard /wp-admin2,916 ▲636.03 ▼0.09121.31 ▼4.56421.90 ▲250.33
Posts /wp-admin/edit.php2,708 ▲203.05 ▼0.1968.72 ▲5.33208.39 ▲64.51
Add New Post /wp-admin/post-new.php1,775 ▲11422.17 ▲5.29480.56 ▲41.87162.82 ▲2.03
Media Library /wp-admin/upload.php1,723 ▲255.50 ▼0.02150.74 ▲4.83194.60 ▼1.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ads-pixel/public/partials/facebook-pixel-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ads-pixel/admin/partials/facebook-pixel-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: event tracker, facebook, pixel, advertise

ads-pixel/facebook-pixel.php 85% from 13 tests

The principal PHP file in "Events Tracker" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ads-pixel.php" instead of "facebook-pixel.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 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin277 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12146609271
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.21
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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