10% perfect-audience-retargeting

Code Review | Perfect Audience Retargeting

WordPress plugin Perfect Audience Retargeting scored 10% from 54 tests.

About plugin

  • Plugin page: perfect-audience-...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 5.8.1
  • First release: Jan 20, 2013
  • Latest release: Aug 17, 2015
  • Number of updates: 26
  • Update frequency: every 40.4 days
  • Top authors: PerfectAudience (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 24,032 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_PerfectAudience has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼192.48ms] Passed 4 tests

A check of server-side resources used by Perfect Audience Retargeting
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼0.945.88 ▼18.04
Dashboard /wp-admin1.79 ▼1.268.76 ▼44.13
Posts /wp-admin/edit.php1.80 ▼1.315.33 ▼38.55
Add New Post /wp-admin/post-new.php1.79 ▼3.649.39 ▼658.04
Media Library /wp-admin/upload.php1.80 ▼1.218.01 ▼29.19
Perfect Audience Retargeting /wp-admin/options-general.php?page=wp_perfectaudience1.804.85

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Perfect Audience Retargeting
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13715.82 ▲0.5315.87 ▲1.2351.83 ▲0.38
Dashboard /wp-admin2,975 ▲455.92 ▼0.04160.37 ▼62.46118.99 ▼5.88
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0074.97 ▼1.9599.55 ▲1.33
Add New Post /wp-admin/post-new.php1,618 ▲3721.40 ▲2.88306.88 ▼143.54110.29 ▼11.73
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.02167.47 ▼9.28121.02 ▼7.52
Perfect Audience Retargeting /wp-admin/options-general.php?page=wp_perfectaudience1,0532.0963.6985.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_PerfectAudience has a deprecated constructor

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_perfectaudience
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_PerfectAudience has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp_perfectaudience
    • > Warning in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience.php+61
    Illegal string offset 'perfect_site_id'
    • > GET request to /wp-admin/options-general.php?page=wp_perfectaudience
    • > Notice in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience.php+61
    Uninitialized string offset: 0

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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/perfect-audience-retargeting/footer-script-code.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: site_id in wp-content/plugins/perfect-audience-retargeting/footer-script-code.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/perfect-audience-retargeting/wp-perfectaudience-admin-tpl.php:14

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 83% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (**Install your tag** - Our Perfect Pixel lets you cookie users AND track conversions using a single tag.), #2 (**Segment your visitors** - Effortlessly isolate just the visitors you want to retarget.), #3 (**Build powerful campaigns** - Design smart, precise, effective campaigns in minutes.), #4 (**We bring your visitors back** - We serve your ads to your users on top sites. They click and return.), #5 (**Track impressions, clicks, and sales** - Measure your ROI in our elegant dashboard. Stats update hourly!)
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Donate link: Invalid URI ("")
The official readme.txt might help

perfect-audience-retargeting/wp-perfectaudience.php 85% from 13 tests

"Perfect Audience Retargeting" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 171 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("perfect-audience-retargeting.php" instead of "wp-perfectaudience.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin69 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3271969

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.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin