10% target-notifications

Code Review | Target Notifications

WordPress plugin Target Notifications scored10%from 54 tests.

About plugin

  • Plugin page: target-notifications
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 26, 2019
  • Latest release: Sep 29, 2020
  • Number of updates: 62
  • Update frequency: every 5.5 days
  • Top authors: wpdever (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /699 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/target-notifications/includes/target_core.php+21
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.37MB] [CPU: ▼2.51ms] Passed 4 tests

This is a short check of server-side resources used by Target Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1843.80 ▲6.08
Dashboard /wp-admin3.73 ▲0.4253.01 ▲6.57
Posts /wp-admin/edit.php3.84 ▲0.4846.17 ▼14.29
Add New Post /wp-admin/post-new.php6.33 ▲0.4493.40 ▼6.60
Media Library /wp-admin/upload.php3.65 ▲0.4239.88 ▲4.76
Target Notifications /wp-admin/admin.php?page=target-main-menu3.6233.00
User interests /wp-admin/admin.php?page=target-menu-select3.6138.22
Mailchimp integration /wp-admin/admin.php?page=target-menu-integration3.6233.07
Subscribers /wp-admin/admin.php?page=target-sub-menu3.6239.48

Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/target-notifications/" and "wp-content/uploads/"
    • (new file) wp-content/logs/target/.empty
Filesystem: 23 new files
Database: 2 new tables, 8 new options
New tables
wp_target_subscribers
wp_target_subscriber_selection
New WordPress options
widget_recent-comments
category_children
db_upgraded
target_options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Target Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲21113.62 ▲0.426.31 ▲1.4942.18 ▼5.27
Dashboard /wp-admin2,232 ▲555.88 ▲0.0395.78 ▼14.0269.64 ▲29.19
Posts /wp-admin/edit.php2,131 ▲392.03 ▲0.0735.12 ▼13.3731.24 ▼14.73
Add New Post /wp-admin/post-new.php1,708 ▲16624.73 ▲6.53622.91 ▼38.0752.55 ▼8.43
Media Library /wp-admin/upload.php1,423 ▲324.16 ▼0.07105.03 ▼2.0045.09 ▲2.26
Target Notifications /wp-admin/admin.php?page=target-main-menu9962.0425.4525.45
User interests /wp-admin/admin.php?page=target-menu-select9512.1024.8629.39
Mailchimp integration /wp-admin/admin.php?page=target-menu-integration8662.0024.2126.09
Subscribers /wp-admin/admin.php?page=target-sub-menu9031.8128.9324.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • category_children
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-notifications/target-notifications.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-notifications/includes/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-notifications/shortcode/target_shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-notifications/includes/target_core.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-notifications/includes/target_activation.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: The official readme.txt might help

target-notifications/target-notifications.php Passed 13 tests

The main PHP file in "Target Notifications" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
131 characters long description:
Target Notifications lets you send automated personalized notifications based on users' categories/tags selected or search queries.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,143 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP162832753,002
CSS21415101
JavaScript14440

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/adminicon.png0.31KB0.38KB0.00%