83% wp-personalizer

Code Review | WP Personalizer - Personalize your content to your visitor

WordPress plugin WP Personalizer - Personalize your content to your visitor scored83%from 54 tests.

About plugin

  • Plugin page: wp-personalizer
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2020
  • Latest release: Feb 8, 2020
  • Number of updates: 3
  • Update frequency: every 3.7 days
  • Top authors: teknikforce (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /545 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 gracefully, with no errors

Server metrics [RAM: ▼0.52MB] [CPU: ▼15.16ms] Passed 4 tests

This is a short check of server-side resources used by WP Personalizer - Personalize your content to your visitor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1640.89 ▲0.10
Dashboard /wp-admin3.47 ▲0.1653.38 ▲1.04
Posts /wp-admin/edit.php3.58 ▲0.2248.77 ▲0.66
Add New Post /wp-admin/post-new.php3.31 ▼2.5839.46 ▼60.77
Media Library /wp-admin/upload.php3.39 ▲0.1639.46 ▼0.63

Server storage [IO: ▲3.89MB] [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: 50 new files
Database: 1 new table, 7 new options
New tables
wp_wppersonalizer
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
personalizer_ppuri10

Browser metrics Passed 4 tests

WP Personalizer - Personalize your content to your visitor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7513.31 ▼1.375.08 ▲3.2527.75 ▼17.94
Dashboard /wp-admin2,242 ▲395.15 ▲0.17114.55 ▲8.3747.23 ▲2.57
Posts /wp-admin/edit.php2,125 ▲252.29 ▲0.2841.37 ▲4.2938.54 ▲3.44
Add New Post /wp-admin/post-new.php6,438 ▲4,89227.89 ▲4.71889.49 ▲228.7052.95 ▼2.52
Media Library /wp-admin/upload.php1,424 ▲244.46 ▲0.23104.24 ▼4.8948.06 ▲1.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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • personalizer_ppuri10
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-personalizer/function/wppersonalisor_browser.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-personalizer/function/wppersonalisor_ip.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-personalizer/unichatbox/user_not_verified_bonus.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-personalizer/ajax_edit.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-personalizer/unichatbox/user_not_verified.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-personalizer/function/wppersonalisor_country.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-personalizer/function/wppersonalisor_region.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-personalizer/ajax_delete.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-personalizer/function/wppersonalisor_city.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-personalizer/function/wppersonalisor_windows.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in wp-personalizer/assets to your readme.txt
Please take inspiration from this readme.txt

wp-personalizer/WPPersonalizer.php 85% from 13 tests

This is the main PHP file of "WP Personalizer - Personalize your content to your visitor" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-personalizer.php" instead of "WPPersonalizer.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)

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
There were no executable files found in this plugin22,820 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,4675213,559
JavaScript62,0221,7177,948
PHP13368251,313

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.00
▷ Minimum class complexity13.00
▷ Maximum class complexity23.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/img/Edit-button.png5.82KB3.32KB▼ 42.89%
asset/img/icon.png1.31KB0.75KB▼ 42.56%
asset/img/update.png6.18KB3.23KB▼ 47.83%
asset/img/delete.png6.34KB3.50KB▼ 44.77%
(invalid) unichatbox/asset/img/blue-icon-security.png13.74KB0.00KB▼ 100.00%