Title: Jaro's Replies | WordPress.org

---

# pixtweaks

  [  ](https://wordpress.org/support/users/pixtweaks/)

 *   [Profile](https://wordpress.org/support/users/pixtweaks/)
 *   [Topics Started](https://wordpress.org/support/users/pixtweaks/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pixtweaks/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pixtweaks/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pixtweaks/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pixtweaks/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pixtweaks/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 96 total)

1 [2](https://wordpress.org/support/users/pixtweaks/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/pixtweaks/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/pixtweaks/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/pixtweaks/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/pixtweaks/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/pixtweaks/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailOptin - Popup, Optin Forms & Email Newsletters for Mailchimp, HubSpot, AWeber Etc.] PHP warnings](https://wordpress.org/support/topic/php-warnings-206/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [5 months, 1 week ago](https://wordpress.org/support/topic/php-warnings-206/#post-18707605)
 * Hi, I found the issue. One of folder in chain has capital letter and code is 
   probing lowercase. It’s in file /wp-content/plugins/mailoptin/src/connections/
   NinjaFormsConnect/Connect.php
 *     ```wp-block-code
       $filename = dirname(__FILE__) . "/integrations/$key.php"; //original code
       ```
   
 *     ```wp-block-code
       $filename = dirname(__FILE__) . "/Integrations/$key.php"; // correct with capital "I"
       ```
   
 * I don’t understand structure of your plugin but generating classes should probably
   happened only in cron or when plugin is activated. Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] PHP Timeout](https://wordpress.org/support/topic/php-timeout-2/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/php-timeout-2/#post-18629035)
 * You welcome! BTW here is the test, if you set 0 in ini_set, the total time will
   be much slower
   [https://onlinephp.io/c/bd146](https://onlinephp.io/c/bd146)
 * Thank you for your work!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] PHP Timeout](https://wordpress.org/support/topic/php-timeout-2/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/php-timeout-2/#post-18628291)
 * I’ve dived into this issue and I got the root cause. The slow regex is caused
   by disabled PCRE JIT. Once you change in php.ini pcre.jit=1 or ini_set(‘pcre.
   jit’,’1′); in wp-config.php, it would be up to 10x faster. For some reasons, 
   shared hostings using Cloudlinux and Litespeed has this setting off by default.
   
   I tested it in the real world scenario, how much improvement it would bring and
   the result is: negligibleA site using translation plugin Translatepress that 
   is heavily using regex shown no sign of improvement in TTFB.Now, I’m very grateful
   that your plugin could detect it and I will everywhere turn this setting on.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] PHP Timeout](https://wordpress.org/support/topic/php-timeout-2/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/php-timeout-2/#post-18626637)
 * I debugged the code and it’s last $paragraphed
 *     ```wp-block-code
       $paragraphed = preg_replace('/\n\n(.+?)(?=\n\n|\z)/s', "<p>\\1</p>", $paragraphed);
       ```
   
 * This test on my local runs in about 220 µs, but on shared hosting, the same I
   posted results, is 2ms, 10x slower for some reason. Now, I think having limit
   you has added is great, but then we don’t have measurement. I suggest split regex
   test into two, simple and complex, move this problematic into the new test and
   make less cycles for it so it’s never more tan 2-3 seconds. Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced IP Blocker] IP location slow implementation](https://wordpress.org/support/topic/ip-location-slow-implementation/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/ip-location-slow-implementation/#post-18621257)
 * Hi, I’m glad I could help.
   I briefly checked the last update, and yes, I see 
   many other things that I would do differently. And I want to make clear that 
   I’m not calming my way is the best way, only from my experience, this is how 
   I would consider from my today’s experience and knowledge. Points are made by
   priority, implementing 1 will bring most benefit and so on.
    1. On what hook is the blocking happening? My guess it’s when plugin run first 
       time. Does it work? Yes! Is this most efficient? Nope. If you want to save as
       much as possible CPU time, you have to make the decision much sooner. Ideally,
       on .htaccess level, the second best is PHP prepend file, the third best on mu-
       plugins hook.
    2. SQL queries
 * 2.1 I’ve seen SQL queries and I’ve seen overuse of the prepare function. Like
   you use to prepare for PHP function time(). There is zero chance a hacker would
   inject SQL statement into time(), if that’s possible, PHP has a BIG issue on 
   the hands. The same thing applies to unnecessary escaping of translations with
   function like esc_html__().
 * 2.2 SQL queries have ORDER and GROUP. These two are the most expensive together
   with OFFSET. Reevaluate them, try to find a way to get what you need from DB 
   without using them
 * 2.3 If a column has just a few words, like wp_advaipbl_logs has log_type and 
   level, use for column ENUMs rather then text. It’s faster for SELECT and occupied
   less space. You can always add new into the table schema.
 * 2.4 INDEX, make sure you have an index only on the column that you need for fast
   query for performing plugin essential functionality – assessing situation for
   blocking. When it’s for viewing data, cron clean up, reports and non essential
   functionality, time is not that important. So yes, your query might be a bit 
   slower but it happening few times. But, not needing writing and maintaining indexes
   when writing could improve performance.
    3. Plugin’s code itself
 * 3.1 In my opinion, the biggest WP problem related to back-end performance is 
   useless code. People say “more plugins, less speed”. That’s partially true. It’s
   true when plugins are not written the day that would execute code only they need.
   Your plugin always required 32 files that occupies 1MB ram in OPcache. That means
   that on any page, it’s not only essential blocking code is loaded, all menus,
   everything has to be compiled and in OPcache. File with your class ADVAIPBL_Main
   has 9018 lines of code. If OPcache is not full, reading the whole file from disk
   and compile into OPcache is relativelly long process. Now add 20 more plugins
   doing the same thing, and you get the result of people saying “more plugins, 
   less speed” and attributing this to WP shortfall instead of inappropriately developed
   plugins. So if you don’t want to be part of that band, you need to separate code
   branches. For example, Ajax code is required and executed only when YOURS Ajax
   request is made. Add to your admin-ajax.php?ip-blocker-something and require 
   Ajax code if isset($_GET[’ip-blocker-something’]).
 * 3.2 Code readiness.
   Long functions, nesting of code, mixing PHP and HTML.Classes
   should separate functionality, you call DB from many parts of the code. What 
   about one class would perform all DB queries? Same for options. Please watch 
   on youtube video “Clean Code – Uncle Bob / Lesson 1”
 * 3.3 I see in wp_options some has “auto” for autoload. Make sure only those settings
   has auto or yes that are really needed on every request, the rest should have‘
   no’. And then I see as a value an empty array a:0:{}. No need to store default
   values, make it rather an empty string.
 * 3.4 I see $_SERVER[‘REQUEST_URI’] 29 times in the code and all has ??’’ or ‘n/
   a’ Why not just once and reused?
 * All right, there is more, but I really don’t have more time now. What I gave 
   you will keep you busy for a while. I hope it will help. 
   All the best,Jaro
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] PHP Timeout](https://wordpress.org/support/topic/php-timeout-2/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/php-timeout-2/#post-18617891)
 * Valid link of the screenshot: [https://go.screenpal.com/watch/cTjuQGn2NFd](https://go.screenpal.com/watch/cTjuQGn2NFd)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] PHP Timeout](https://wordpress.org/support/topic/php-timeout-2/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/php-timeout-2/#post-18617242)
 * How this server is slow? It doesn’t make sense.
   [https://d3v55qvjb2v012.cloudfront.net/VfEm/2025/08/28/09/45/cTjuQGn2NFd/sc.png?srcid=cTjuQGn2NFd&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kM3Y1NXF2amIydjAxMi5jbG91ZGZyb250Lm5ldC9WZkVtLzIwMjUvMDgvMjgvMDkvNDUvY1RqdVFHbjJORmQvc2MucG5nP3NyY2lkPWNUanVRR24yTkZkIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzU2Mzc0NDE5fX19XX0_&Signature=fNbBe99Gqz2A9r5F3WUnZQ1qNh1-n18wRTuQqd5YDRmCBwhhwGTnMBS16ZQLQrF9AVsE5rO9En3VwV9ytI2Y0Cu97UV10e7CZNQTWIvPuFvBCoZDVVyxpC2WIZK4QAP43vumgRwSwGhD3yb5X1IYQMGPv4dY-9CfA~lZ5SxVNpU_&Key-Pair-Id=APKAI4E2RN57D46ONMEQ](https://d3v55qvjb2v012.cloudfront.net/VfEm/2025/08/28/09/45/cTjuQGn2NFd/sc.png?srcid=cTjuQGn2NFd&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kM3Y1NXF2amIydjAxMi5jbG91ZGZyb250Lm5ldC9WZkVtLzIwMjUvMDgvMjgvMDkvNDUvY1RqdVFHbjJORmQvc2MucG5nP3NyY2lkPWNUanVRR24yTkZkIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzU2Mzc0NDE5fX19XX0_&Signature=fNbBe99Gqz2A9r5F3WUnZQ1qNh1-n18wRTuQqd5YDRmCBwhhwGTnMBS16ZQLQrF9AVsE5rO9En3VwV9ytI2Y0Cu97UV10e7CZNQTWIvPuFvBCoZDVVyxpC2WIZK4QAP43vumgRwSwGhD3yb5X1IYQMGPv4dY-9CfA~lZ5SxVNpU_&Key-Pair-Id=APKAI4E2RN57D46ONMEQ)
    -  This reply was modified 7 months, 2 weeks ago by [pixtweaks](https://wordpress.org/support/users/pixtweaks/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced IP Blocker] IP location slow implementation](https://wordpress.org/support/topic/ip-location-slow-implementation/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/ip-location-slow-implementation/#post-18616295)
 * Hi, thank you for the response. 
   API call on small blog with now much traffic
   is not a problem. I develop plugins for high traffic sites where in 5 minutes
   can come 15K unique users. If you’re a admin of such a site, plugin like yours
   would never will be on possible security plugin list, I assure you of that. And
   you see, every major issue starts as something that is not problem on a small
   site, nobody notices the difference, only when it grows too much, it’s out of
   control and it’s much harder to deal with it. One more scenario: DDoS attack,
   imagine 100K unique IP addresses in few minutes, how much data will be in options
   table with 100K transients. Yes, I know, most server won’t withstand such a traffic,
   but those who will, would suffer a lot. You’re building a security plugin, you
   should count on edge cases, because they do happen.I still believe that your 
   caching in transient strategy is not effective one. If you need to know right
   away the country or ASN then you should have locally database of IP spaces like
   WordFence or others. If you don’t need to have it right way, then store just 
   IP and with cron, or when displaying the data, fetch the API.And about SQLite,
   really it’s ideal for storing data, latency could be 10x shorter than MySQL and
   you don’t risk blow up the database size. For whitelist/blacklist absolutely 
   ideal solution.All the best!Jaro
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] Network Performance Benchmark](https://wordpress.org/support/topic/network-performance-benchmark/)
 *  [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/network-performance-benchmark/#post-18614033)
 * I think this test is chronically unreliable, should be optional and not as essential
   part of the score. Maybe [@antonaleksandrov](https://wordpress.org/support/users/antonaleksandrov/)
   would consider it?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Hosting Benchmark tool] How to speed up REGEX string processing?](https://wordpress.org/support/topic/how-to-speed-up-regex-string-processing/)
 *  [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/how-to-speed-up-regex-string-processing/#post-18614031)
 * [@galbaras](https://wordpress.org/support/users/galbaras/) Hi, I just tested 
   2 shared hosting and got very low score, test lasting up to 54 seconds. But on
   fast VPS it’s 2.5 seconds. It looks like shared hosting has problem with processing
   Regex. However, I would argue, that it’s a synthetic test, it may not represent
   real world scenario how regex is used.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder] Icon character makes fatal error](https://wordpress.org/support/topic/icon-character-makes-fatal-error/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/icon-character-makes-fatal-error/#post-18567463)
 * Hello [@amimulihsanmahdi](https://wordpress.org/support/users/amimulihsanmahdi/),
   
   It’s texarea field, but I think I got the reason. It’s probably incompatibility
   of database or table attributes.This query is from $newQuery = $this->bindParams(
   $query, $bindings, true); the same file and previous line where fatal error is
   triggered.
 *     ```wp-block-code
       insert into wp_fluentform_entry_details (form_id, submission_id, field_name, sub_field_name, field_value) values (3, 819, 'message', '', '🙏')
       ```
   
 * When your code tries to insert it fails and there is no record. When I take this
   code and insert manually, it’s inserted with error and field_value column has`?`
   sign instead of this character.
 *     ```wp-block-code
       Warning: #1366 Incorrect string value: '\xF0\x9F\x99\x8F' for column firstclass3.wp_fluentform_entry_details.field_value at row 1
       ```
   
 * To me my version of DB engine doesn’t like those characters in this configuration.
   First I have detected this error on 10.6.22-MariaDB and on my local 11.4.5-MariaDB
   is the same.
   Here is CREATE of the table
 *     ```wp-block-code
       CREATE TABLE wp_fluentform_entry_details ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, form_id bigint(20) unsigned DEFAULT NULL, submission_id bigint(20) unsigned DEFAULT NULL, field_name varchar(255) DEFAULT NULL, sub_field_name varchar(255) DEFAULT NULL, field_value longtext DEFAULT NULL, PRIMARY KEY (id)) ENGINE=InnoDB AUTO_INCREMENT=4824 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
       ```
   
 * Now, digging deeper, I see that on new installation CHARSET is utf8mb4 that supports
   those characters and problematic query is inserted without an issue. But for 
   some reason, on my site it’s different CHARSET. Maybe legacy settings of your
   tables or WP version when the table been created?
   I can now convert it, no problem,
   but I would suggest from your part:1. When plugin is activated or updated, checkup
   for `utf8mb4` is triggered and adjusted, or at least show warning to admin.2.
   This is for your developer, please pass the message: Handle gracefully errors
   and exceptions. There is no reason for your code trigger the FATAL ERROR when
   such a case occurs. User on the front end should not see system fatal error but
   an error message.Thank you for your plugins and support!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Starbox - the Author Box for Humans] Plugins breaks forms of other plugins in WP-ADMIN](https://wordpress.org/support/topic/plugins-breaks-forms-of-other-plugins-in-wp-admin/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [9 months, 3 weeks ago](https://wordpress.org/support/topic/plugins-breaks-forms-of-other-plugins-in-wp-admin/#post-18525780)
 * All you need to do is:
   file: `classes\FrontController.php`line: `108`original
   code: `if ( ! is_admin() ) //this hook is for admin panel only`new code: `if (!
   is_admin() || ($_GET['page']??'') !== 'abh_settings' ) //this hook is for admin
   panel only`Thank you 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Starbox - the Author Box for Humans] Plugins breaks forms of other plugins in WP-ADMIN](https://wordpress.org/support/topic/plugins-breaks-forms-of-other-plugins-in-wp-admin/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [9 months, 3 weeks ago](https://wordpress.org/support/topic/plugins-breaks-forms-of-other-plugins-in-wp-admin/#post-18524590)
 * Hello Peter,
   replication and solution is very simple. Login into website where
   this plugin is used, open developer console and in Network put into filter `starbox`
   Refresh the page and you should see these two requests:/wp-content/plugins/starbox/
   themes/admin/css/menu.min.css?ver=3.5.4/wp-content/plugins/starbox/themes/admin/
   js/menu.min.js?ver=3.5.4Here is the issue, unless you’re on page :`/wp-admin/
   options-general.php?page=abh_settings`these two request should not been made,
   as your plugin doesn’t do anything on given page. So please let know the developer
   to put condition before enqueue styles and script, or even better, not require
   PHP files, unless it’s your `page=abh_settings` or part of website where plugin
   does its thing. Thank you!Here is screenshot of dev tools[https://go.screenpal.com/watch/cT102fnXd13](https://go.screenpal.com/watch/cT102fnXd13)
    -  This reply was modified 9 months, 3 weeks ago by [pixtweaks](https://wordpress.org/support/users/pixtweaks/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] 32768 – Database error, Duplicate entry ‘lastNotificationID’](https://wordpress.org/support/topic/32768-database-error-duplicate-entry-lastnotificationid/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/32768-database-error-duplicate-entry-lastnotificationid/#post-18122015)
 * Hi,
   thanks for the reply. How I see it that this table is config table `wp_wfConfig`
   so, when the plugin is activated, default settings is inserted, including `lastNotificationID`
   so `UPDATE` will work all the time, presuming there is no `DELETE` for this row.
   Regards,Jaro
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice)] run JS after accept](https://wordpress.org/support/topic/run-js-after-accept/)
 *  Thread Starter [pixtweaks](https://wordpress.org/support/users/pixtweaks/)
 * (@pixtweaks)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/run-js-after-accept/#post-18017697)
 * Thank you [@cookieyesteam](https://wordpress.org/support/users/cookieyesteam/)
   for pointing me in the right direction. Here is the code that works for me, when
   performance cookies are allowed it will log the console. It may help somebody
   else.
 * document.addEventListener(‘cookieyes_consent_update’, function (e) {
 *     if (e.detail && e.detail.accepted.includes(‘performance’)) {
 *       console.log(‘Performance allowed for the first time’);
 *     }
 * });
 * document.addEventListener(‘cookieyes_banner_load’, function (e){
 *     if (e.detail && e.detail.categories && e.detail.categories.performance ==
   = true) {
 *         console.log(‘Performance allowed repeated load’);
 *     }
 * });

Viewing 15 replies - 1 through 15 (of 96 total)

1 [2](https://wordpress.org/support/users/pixtweaks/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/pixtweaks/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/pixtweaks/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/pixtweaks/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/pixtweaks/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/pixtweaks/replies/page/2/?output_format=md)