68% wp-search-insights

Code Review | WP Search Insights - Privacy-Friendly Search Analytics

WordPress plugin WP Search Insights - Privacy-Friendly Search Analytics scored68%from 54 tests.

About plugin

  • Plugin page: wp-search-insights
  • Plugin version: 1.3.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Nov 5, 2022
  • Number of updates: 41
  • Update frequency: every 25.9 days
  • Top authors: RogierLankhorst (80.49%)markwolters (21.95%)

Code review

54 tests

User reviews

28 reviews

Install metrics

4,000+ active /34,730 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▲14.89ms] Passed 4 tests

This is a short check of server-side resources used by WP Search Insights - Privacy-Friendly Search Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3564.65 ▲18.95
Dashboard /wp-admin3.91 ▲0.5675.44 ▲6.90
Posts /wp-admin/edit.php3.93 ▲0.5875.39 ▲32.82
Add New Post /wp-admin/post-new.php6.40 ▲0.51113.53 ▲10.21
Media Library /wp-admin/upload.php3.74 ▲0.5160.39 ▲23.51
WP Search Insights /wp-admin/tools.php?page=wpsi-settings-page3.7753.09

Server storage [IO: ▲1.20MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 76 new files
Database: 2 new tables, 16 new options
New tables
wp_searchinsights_archive
wp_searchinsights_single
New WordPress options
wpsi_database_created
can_compress_scripts
wpsi-current-version
db_upgraded
search_insights_db_version
wpsi_database_postids_upgrade_completed
wpsi_select_dashboard_capability
wpsi_checked_ajax_plugins
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Search Insights - Privacy-Friendly Search Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲18813.88 ▼0.426.35 ▲4.3931.86 ▼13.40
Dashboard /wp-admin2,359 ▲1855.88 ▲0.19118.87 ▲29.81100.36 ▲61.04
Posts /wp-admin/edit.php2,115 ▲122.02 ▲0.0136.76 ▼1.1332.39 ▼4.37
Add New Post /wp-admin/post-new.php1,535 ▲723.50 ▲0.41681.15 ▲29.4257.38 ▼6.93
Media Library /wp-admin/upload.php1,412 ▲124.18 ▲0.01103.91 ▲0.8944.37 ▲0.53
WP Search Insights /wp-admin/tools.php?page=wpsi-settings-page1,9903.28115.4065.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_searchinsights_archive
    • wp_searchinsights_single
  • Zombie WordPress options were found after uninstall: 16 options
    • wpsi_select_term_deletion_period
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpsi_max_term_length
    • theysaidso_admin_options
    • wpsi_min_term_length
    • wpsi-current-version
    • wpsi_checked_ajax_plugins
    • wpsi_database_created
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 23× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-search-insights/class-admin.php
    • > /wp-content/plugins/wp-search-insights/templates/tipstricks-element.php
    • > /wp-content/plugins/wp-search-insights/cron.php
    • > /wp-content/plugins/wp-search-insights/class-help.php
    • > /wp-content/plugins/wp-search-insights/class-review.php
    • > /wp-content/plugins/wp-search-insights/templates/grid-dashboard-row.php
    • > /wp-content/plugins/wp-search-insights/grid/grid.php
    • > /wp-content/plugins/wp-search-insights/wp-search-insights.php
    • > /wp-content/plugins/wp-search-insights/grid/templates/grid-container.php
    • > /wp-content/plugins/wp-search-insights/grid/templates/grid-element.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-search-insights/integrations/toolset.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: history, statistics, recording searches, search, analytics

wp-search-insights/wp-search-insights.php 92% from 13 tests

The principal PHP file in "WP Search Insights - Privacy-Friendly Search Analytics" v. 1.3.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected14,135 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript211,6502,7938,002
PHP256456002,882
CSS1084931,875
LESS32961011,362
SVG21014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.88
▷ Minimum class complexity2.00
▷ Maximum class complexity134.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods109
▷ Static methods87.34%
▷ Public methods9889.91%
▷ Protected methods00.00%
▷ Private methods1110.09%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png12.26KB6.33KB▼ 48.39%
assets/images/rsssl-logo.png18.51KB5.85KB▼ 68.41%
assets/images/really-simple-plugins.png8.39KB8.04KB▼ 4.14%
assets/images/sort_desc.png1.04KB0.25KB▼ 76.32%
assets/images/complianz-logo.png6.31KB3.61KB▼ 42.80%