73% searchpro

Code Review | BerqWP - Core Web Vitals, PageSpeed & Mobile Optimization

WordPress plugin BerqWP - Core Web Vitals, PageSpeed & Mobile Optimization scored73%from 54 tests.

About plugin

  • Plugin page: searchpro
  • Plugin version: 1.4.36
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4.1
  • WordPress version: 6.3.1
  • First release: May 22, 2022
  • Latest release: Nov 26, 2023
  • Number of updates: 70
  • Update frequency: every 7.9 days
  • Top authors: thevisionofhamza (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,057 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.61MB] [CPU: ▲5.68ms] Passed 4 tests

Server-side resources used by BerqWP - Core Web Vitals, PageSpeed & Mobile Optimization
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.77 ▲1.3156.13 ▲14.64
Dashboard /wp-admin4.62 ▲1.3166.62 ▲18.48
Posts /wp-admin/edit.php4.67 ▲1.3264.66 ▲15.99
Add New Post /wp-admin/post-new.php4.44 ▼1.4564.98 ▼26.40
Media Library /wp-admin/upload.php4.50 ▲1.2755.05 ▲21.83
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.7362.05

Server storage [IO: ▲0.64MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/searchpro/" and "wp-content/uploads/"
    • (new file) wp-content/cache/berqwp/.empty
Filesystem: 139 new files
Database: 4 new tables, 20 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_groups
wp_actionscheduler_claims
wp_actionscheduler_logs
New WordPress options
berqwp_webp_max_width
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
berqwp_enable_sandbox
berqwp_image_lazyloading
db_upgraded
berqwp_post_type_names
widget_recent-posts
schema-ActionScheduler_StoreSchema
...

Browser metrics Passed 4 tests

Checking browser requirements for BerqWP - Core Web Vitals, PageSpeed & Mobile Optimization
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9114.68 ▲0.281.44 ▼0.3043.62 ▼1.52
Dashboard /wp-admin2,253 ▲795.60 ▼0.0392.59 ▼6.2242.73 ▼3.38
Posts /wp-admin/edit.php2,163 ▲632.04 ▲0.0236.73 ▼3.3734.40 ▼4.68
Add New Post /wp-admin/post-new.php1,555 ▲2722.22 ▼0.89678.66 ▲103.6652.60 ▼3.44
Media Library /wp-admin/upload.php1,458 ▲614.29 ▲0.1099.96 ▼2.3843.09 ▼3.40
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,3441.8127.8344.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 4 tables
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
    • wp_actionscheduler_claims
  • Zombie WordPress options detected upon uninstall: 20 options
    • widget_recent-comments
    • berqwp_post_type_names
    • schema-ActionScheduler_LoggerSchema
    • berqwp_webp_quality
    • berqwp_javascript_execution_mode
    • theysaidso_admin_options
    • schema-ActionScheduler_StoreSchema
    • berqwp_disable_emojis
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 take a closer look at the following
  • 43× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_LogEntry' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_FinishedAction' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Lock' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/ActionScheduler_OptionLock.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_QueueRunner' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schedule' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_SimpleSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_QueueRunner_Deprecated' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_QueueRunner' not found in wp-content/plugins/searchpro/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

searchpro/berqwp.php 77% from 13 tests

The primary PHP file in "BerqWP - Core Web Vitals, PageSpeed & Mobile Optimization" version 1.4.36 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("searchpro.php" instead of "berqwp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected10,048 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162,2195,8749,079
CSS1640413
Sass1671412
Markdown237090
JSON20054

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.55
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes83
▷ Abstract classes1518.07%
▷ Concrete classes6881.93%
▷ Final classes00.00%
Methods688
▷ Static methods8111.77%
▷ Public methods51775.15%
▷ Protected methods13920.20%
▷ Private methods324.65%
Functions36
▷ Named functions2363.89%
▷ Anonymous functions1336.11%
Constants41
▷ Global constants819.51%
▷ Class constants3380.49%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/logo.png11.37KB5.20KB▼ 54.29%
admin/img/berqwp-logo-light.png8.90KB4.83KB▼ 45.73%