48% wp-dxp

Code Review | PersonalizeWP (Previous)

WordPress plugin PersonalizeWP (Previous) scored48%from 54 tests.

About plugin

  • Plugin page: wp-dxp
  • Plugin version: 1.6.6
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 19, 2020
  • Latest release: Oct 27, 2023
  • Number of updates: 41
  • Update frequency: every 29.9 days
  • Top authors: tommc1985filter (56.1%)davecpage (46.34%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,601 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.85MB] [CPU: ▲0.04ms] Passed 4 tests

Analyzing server-side resources used by PersonalizeWP (Previous)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8642.61 ▲5.18
Dashboard /wp-admin4.19 ▲0.8848.04 ▲2.26
Posts /wp-admin/edit.php4.24 ▲0.8845.89 ▼1.24
Add New Post /wp-admin/post-new.php6.75 ▲0.8684.19 ▼6.06
Media Library /wp-admin/upload.php4.05 ▲0.8142.48 ▲9.08
Settings /wp-admin/admin.php?page=wp-dxp/settings4.0341.53
Categories /wp-admin/admin.php?page=wp-dxp/categories4.0544.13
Personalization /wp-admin/admin.php?page=wp-dxp/rules4.1449.52
Dashboard /wp-admin/admin.php?page=wp-dxp4.0339.08

Server storage [IO: ▲6.31MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 206 new files
Database: 3 new tables, 9 new options
New tables
wp_wp_dxp_rules
wp_dxp_active_blocks
wp_wp_dxp_categories
New WordPress options
wp_dxp_admin_onboarding_message
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
wp_dxp_editor_role_values
wp_dxp_last_migration

Browser metrics Passed 4 tests

Checking browser requirements for PersonalizeWP (Previous)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲19015.20 ▲0.4640.68 ▲38.7438.49 ▼2.86
Dashboard /wp-admin2,235 ▲585.58 ▼0.0985.20 ▼2.8738.18 ▲0.85
Posts /wp-admin/edit.php2,140 ▲402.00 ▼0.0235.37 ▼1.2634.65 ▼1.34
Add New Post /wp-admin/post-new.php1,724 ▲19624.07 ▲0.80685.95 ▼10.3530.19 ▼21.41
Media Library /wp-admin/upload.php1,440 ▲404.15 ▼0.04104.07 ▼12.4343.61 ▼2.62
Settings /wp-admin/admin.php?page=wp-dxp/settings1,1962.2837.0469.98
Categories /wp-admin/admin.php?page=wp-dxp/categories1,6062.5652.0161.12
Personalization /wp-admin/admin.php?page=wp-dxp/rules2,8662.8657.3065.38
Dashboard /wp-admin/admin.php?page=wp-dxp1,2632.2733.0741.78

Uninstaller [IO: ▲6.31MB] [DB: ▲0.01MB] 0% 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
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-dxp/includes/wp-dxp-constants.php+3
    Constant WP_DXP_TAG already defined
  • Incomplete uninstall procedure, leaving 206 files (6.31MB) in the plugin directory
    • (new file) LICENSE.txt
    • (new file) admin/class-wp-dxp-admin-rules-page.php
    • (new file) admin/class-wp-dxp-admin-blocks.php
    • (new file) admin/class-wp-dxp-admin-dashboard-page.php
    • (new file) admin/class-wp-dxp-admin.php
    • (new file) README.txt
    • (new file) admin/class-wp-dxp-admin-base-page.php
    • (new file) admin/class-wp-dxp-admin-categories-page.php
    • (new file) GeoLite2-Country.mmdb
    • (new file) admin/class-wp-dxp-admin-settings-page.php
    • ...
  • Zombie tables were found after uninstall: 3 tables
    • wp_wp_dxp_categories
    • wp_wp_dxp_rules
    • wp_dxp_active_blocks
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • wp_dxp_editor_role_values
    • recovery_mode_email_last_sent
    • wp_dxp_last_migration
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-dxp/admin/partials/_other/footer.php
    • > /wp-content/plugins/wp-dxp/public/partials/wp-dxp-public-display.php
  • 90× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/wp-dxp/vendor/maxmind/web-service-common/src/Exception/AuthenticationException.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-dxp/admin/partials/_other/cta.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-dxp/admin/partials/rules/edit.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Wp_Dxp_Admin_Base_Page' not found in wp-content/plugins/wp-dxp/admin/class-wp-dxp-admin-dashboard-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/wp-dxp/vendor/geoip2/geoip2/src/Exception/HttpException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Wp_Dxp_Admin_Base_Page' not found in wp-content/plugins/wp-dxp/admin/class-wp-dxp-admin-categories-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/wp-dxp/vendor/maxmind/web-service-common/src/Exception/IpAddressNotFoundException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wp_Dxp_Base_Condition' not found in wp-content/plugins/wp-dxp/includes/conditions/core-users-last-visit.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-dxp/admin/partials/rules/_form.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/wp-dxp/vendor/geoip2/geoip2/src/Model/Asn.php:21

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: personalization, show content, personalisation, segmentation, conditions...

wp-dxp/wp-dxp.php 92% from 13 tests

"PersonalizeWP (Previous)" version 1.6.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 307 characters long)

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
Success! There were no dangerous files found in this plugin30,573 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
CSS512810511,267
PO File62,6733,2937,999
PHP1251,6973,3617,094
JavaScript92401151,853
Markdown73720878
C19718589
SVG1300429
JSON500384
Bourne Shell120040
m418032
C/C++ Header14128

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.01
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces13
Interfaces2
Traits0
Classes89
▷ Abstract classes33.37%
▷ Concrete classes8696.63%
▷ Final classes00.00%
Methods397
▷ Static methods5614.11%
▷ Public methods32281.11%
▷ Protected methods174.28%
▷ Private methods5814.61%
Functions30
▷ Named functions516.67%
▷ Anonymous functions2583.33%
Constants60
▷ Global constants4270.00%
▷ Class constants1830.00%
▷ Public constants18100.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
11 PNG files occupy 0.75MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
admin/img/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
admin/img/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
admin/img/dashboard-sample.png752.54KB370.69KB▼ 50.74%
admin/img/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%