78% ads-pixel

Code Review | Events Tracker

WordPress plugin Events Tracker scored78%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: 6.3.1
  • 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 /425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Events Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.40 ▼4.26
Dashboard /wp-admin3.33 ▲0.0247.85 ▼1.45
Posts /wp-admin/edit.php3.38 ▲0.0247.51 ▲4.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.59 ▲1.88
Media Library /wp-admin/upload.php3.25 ▲0.0235.63 ▼2.81

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Events Tracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19414.27 ▼0.0931.90 ▲30.1642.90 ▼1.94
Dashboard /wp-admin2,226 ▲385.85 ▲0.96107.11 ▲5.3444.22 ▲3.08
Posts /wp-admin/edit.php2,109 ▲202.02 ▼0.0439.30 ▲0.9533.81 ▲1.90
Add New Post /wp-admin/post-new.php1,538 ▲523.30 ▲0.01603.30 ▼65.7351.26 ▼9.60
Media Library /wp-admin/upload.php1,408 ▲234.32 ▲0.0997.84 ▼20.5043.33 ▼3.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ads-pixel/public/partials/facebook-pixel-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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: advertise, facebook, event tracker, pixel

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

"Events Tracker" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ads-pixel.php" instead of "facebook-pixel.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected277 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12146609271
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected