66% popbot

Code Review | PopBot - Create targeted pop-ups to convert your visitors

WordPress plugin PopBot - Create targeted pop-ups to convert your visitors scored66%from 54 tests.

About plugin

  • Plugin page: popbot
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2022
  • Latest release: Jan 17, 2023
  • Number of updates: 39
  • Update frequency: every 1.1 days
  • Top authors: wrdstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼3.38ms] Passed 4 tests

Server-side resources used by PopBot - Create targeted pop-ups to convert your visitors
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.4954.85 ▲11.84
Dashboard /wp-admin4.01 ▲0.3853.36 ▼13.91
Posts /wp-admin/edit.php4.08 ▲0.4058.66 ▲2.73
Add New Post /wp-admin/post-new.php6.94 ▲0.7993.27 ▼8.03
Media Library /wp-admin/upload.php3.94 ▲0.4543.13 ▲5.71
All PopBots /wp-admin/admin.php?page=popbot-archive3.8439.50
Edit PopBot /wp-admin/admin.php?page=popbot-edit3.8433.58
Create a PopBot /wp-admin/admin.php?page=popbot-templates3.8437.76
Dashboard /wp-admin/admin.php?page=popbot-dashboard3.9037.10
PopBot /wp-admin/admin.php?page=popbot-home3.7329.40

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 94 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
popbot_version
popbot_require_rewrite_rules_flush
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for PopBot - Create targeted pop-ups to convert your visitors
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲8014.79 ▲0.424.18 ▲2.0138.34 ▼5.43
Dashboard /wp-admin2,261 ▲845.70 ▲0.0688.33 ▼10.2338.31 ▼0.42
Posts /wp-admin/edit.php2,170 ▲702.02 ▲0.0140.78 ▲1.4637.78 ▲0.84
Add New Post /wp-admin/post-new.php1,571 ▲4523.16 ▲5.61647.62 ▼39.5950.63 ▼4.65
Media Library /wp-admin/upload.php1,460 ▲634.19 ▼0.05105.89 ▲3.0347.87 ▲6.83
All PopBots /wp-admin/admin.php?page=popbot-archive1,2492.2637.3058.29
Edit PopBot /wp-admin/admin.php?page=popbot-edit7291.7011.5026.22
Create a PopBot /wp-admin/admin.php?page=popbot-templates1,1192.4031.2444.65
Dashboard /wp-admin/admin.php?page=popbot-dashboard1,4202.3540.8445.70
PopBot /wp-admin/admin.php?page=popbot-home1,4182.5039.0135.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=popbot-edit
    • > Notice in wp-content/plugins/popbot/pages/edit.php+10
    Undefined index: post

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/popbot/pages/templates.php
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function popbot\\add_action() in wp-content/plugins/popbot/src/class-admin-page.php:128
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_popbot_setting() in wp-content/plugins/popbot/templates/box/template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_popbot_setting() in wp-content/plugins/popbot/templates/halfnhalf/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function popbot\\esc_attr_e() in wp-content/plugins/popbot/pages/archive.php:12
    • > PHP Notice
      Undefined index: post in wp-content/plugins/popbot/pages/edit.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_popbot_setting() in wp-content/plugins/popbot/templates/floatingbar/template.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function popbot\\add_action() in wp-content/plugins/popbot/popbot.php:215
    • > PHP Fatal error
      Uncaught Error: Call to undefined function popbot\\get_post() in wp-content/plugins/popbot/pages/edit.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function popbot_setting() in wp-content/plugins/popbot/templates/chatbox/template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_popbot_setting() in wp-content/plugins/popbot/templates/box/settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Javascript (severe) in unknown
    /wp-content/plugins/popbot/assets/scripts/dist/public.js?ver=1.0.3 0:4211 Uncaught TypeError: Cannot read properties of undefined (reading 'mobile')
    • > GET request to /wp-admin/admin.php?page=popbot-templates
    • > Network (severe)
    wp-json/popbot/v1/templates?category=&per_page=20 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-templates
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=popbot-templates 0:0 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/admin.php?page=popbot-dashboard
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-09-30T21%3A00%3A00.000Z&date_end=2023-10-14T12%3A14%3A34.386Z&event_type=shown - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-dashboard
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-10-14T12%3A14%3A34.386Z&date_end=2023-09-30T21%3A00%3A00.000Z&event_type=shown - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=popbot-dashboard 0:0 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/admin.php?page=popbot-dashboard
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-09-30T21%3A00%3A00.000Z&date_end=2023-10-14T12%3A14%3A34.422Z&event_type=converted - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-dashboard
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-10-14T12%3A14%3A34.422Z&date_end=2023-09-30T21%3A00%3A00.000Z&event_type=converted - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-dashboard
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-09-30T21%3A00%3A00.000Z&date_end=2023-10-14T12%3A14%3A34.424Z&event_type=dismissed - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-dashboard
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-10-14T12%3A14%3A34.424Z&date_end=2023-09-30T21%3A00%3A00.000Z&event_type=dismissed - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-09-30T21%3A00%3A00.000Z&date_end=2023-10-14T12%3A14%3A36.194Z&event_type=shown - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-10-14T12%3A14%3A36.194Z&date_end=2023-09-30T21%3A00%3A00.000Z&event_type=shown - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-09-30T21%3A00%3A00.000Z&date_end=2023-10-14T12%3A14%3A36.230Z&event_type=converted - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-10-14T12%3A14%3A36.230Z&date_end=2023-09-30T21%3A00%3A00.000Z&event_type=converted - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-09-30T21%3A00%3A00.000Z&date_end=2023-10-14T12%3A14%3A36.231Z&event_type=dismissed - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=popbot-home
    • > Network (severe)
    wp-json/popbot/v1/analytics?context=count&date_start=2023-10-14T12%3A14%3A36.231Z&date_end=2023-09-30T21%3A00%3A00.000Z&event_type=dismissed - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

popbot/popbot.php 85% from 13 tests

The primary PHP file in "PopBot - Create targeted pop-ups to convert your visitors" version 1.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)
  • Domain Path: The domain path folder was not found ("/languages")

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
Good job! No executable or dangerous file extensions detected10,534 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript391,5341396,654
PHP327442642,704
CSS718351,123
JSON50050
SVG1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.69
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods195
▷ Static methods6030.77%
▷ Public methods17891.28%
▷ Protected methods00.00%
▷ Private methods178.72%
Functions14
▷ Named functions750.00%
▷ Anonymous functions750.00%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.87MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/welcomemat/screenshot.png24.26KB3.96KB▼ 83.66%
assets/images/bg.png708.65KB349.57KB▼ 50.67%
templates/box/screenshot.png32.14KB6.25KB▼ 80.55%
templates/chatbox/assistant.png13.13KB13.13KB0.01%
templates/halfnhalf/screenshot.png58.44KB14.87KB▼ 74.55%