84% audience-segment-taxonomies

Code Review | Audience Segments

WordPress plugin Audience Segments scored84%from 54 tests.

About plugin

  • Plugin page: audience-segment-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: May 2, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: alquemie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /850 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲1.02ms] Passed 4 tests

An overview of server-side resources used by Audience Segments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.57 ▼0.05
Dashboard /wp-admin3.47 ▲0.1650.22 ▼2.18
Posts /wp-admin/edit.php3.55 ▲0.1960.87 ▲11.37
Add New Post /wp-admin/post-new.php6.05 ▲0.1690.76 ▼5.06
Media Library /wp-admin/upload.php3.39 ▲0.1645.45 ▲12.64
Subject Matter /wp-admin/edit-tags.php?taxonomy=audience-subject3.3837.22
Division /wp-admin/edit-tags.php?taxonomy=audience-division3.3835.86
Segments /wp-admin/edit-tags.php?taxonomy=audience-segment3.3839.74
Audience Settings /wp-admin/admin.php?page=alquemie_audience_settings3.4038.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
alquemie_audience_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Audience Segments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11613.64 ▼0.651.82 ▲0.0236.24 ▼7.30
Dashboard /wp-admin2,244 ▲565.87 ▲1.00109.63 ▼5.8642.12 ▼3.00
Posts /wp-admin/edit.php2,127 ▲382.17 ▲0.1640.60 ▲3.8935.68 ▲1.83
Add New Post /wp-admin/post-new.php1,561 ▲2523.30 ▲0.26675.42 ▲17.0749.54 ▼7.37
Media Library /wp-admin/upload.php1,423 ▲354.20 ▼0.0091.86 ▼2.7841.40 ▼0.98
Subject Matter /wp-admin/edit-tags.php?taxonomy=audience-subject1,2692.1328.6030.53
Division /wp-admin/edit-tags.php?taxonomy=audience-division1,2722.1324.5727.47
Segments /wp-admin/edit-tags.php?taxonomy=audience-segment1,2662.1326.3228.26
Audience Settings /wp-admin/admin.php?page=alquemie_audience_settings9232.0326.6830.49

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • alquemie_audience_options
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alquemie_audience_settings
    • > Notice in wp-content/plugins/audience-segment-taxonomies/inc/settings-page.php+9
    Undefined property: Alquemie_Audience_Segments::$types_enabled
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alquemie_audience_settings
    • > Warning in wp-content/plugins/audience-segment-taxonomies/inc/settings-page.php+51
    in_array() expects parameter 2 to be array, null given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alquemie_audience_settings
    • > Notice in wp-content/plugins/audience-segment-taxonomies/inc/settings-page.php+51
    Undefined index: audience_post_types

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: google analytics, reporting, buyer journey, audience, marketing

audience-segment-taxonomies/audience.php 85% from 13 tests

The entry point to "Audience Segments" version 1.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("audience-segment-taxonomies.php" instead of "audience.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin1,351 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12172319795
Markdown21540539
JSON20017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.60
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods510.20%
▷ Public methods3979.59%
▷ Protected methods00.00%
▷ Private methods1020.41%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin