10% user-recent-search-history

Code Review | User Recent Search History

WordPress plugin User Recent Search History scored 10% from 54 tests.

About plugin

  • Plugin page: user-recent-searc...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 13, 2014
  • Latest release: Apr 10, 2014
  • Number of updates: 8
  • Update frequency: every 3.6 days
  • Top authors: dipali.dhole27@gmail.com (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,588 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/user-recent-search-history/user-search-history-widget.php+103
    Methods with the same name as their class will not be constructors in a future version of PHP; User_Search_History_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼48.59ms] Passed 4 tests

This is a short check of server-side resources used by User Recent Search History
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.187.77 ▼36.30
Dashboard /wp-admin2.30 ▼1.019.99 ▼39.68
Posts /wp-admin/edit.php2.30 ▼1.0611.87 ▼34.33
Add New Post /wp-admin/post-new.php2.30 ▼3.5910.12 ▼84.04
Media Library /wp-admin/upload.php2.30 ▼0.9311.28 ▼21.95

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: 1 new table, 7 new options
New tables
wp_searchhistory
New WordPress options
can_compress_scripts
widget_user_searches
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by User Recent Search History
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.29 ▼1.091.72 ▼0.3244.95 ▼6.10
Dashboard /wp-admin2,209 ▲215.89 ▼0.01110.41 ▼12.6143.04 ▲0.68
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0332.86 ▼0.8131.02 ▼4.27
Add New Post /wp-admin/post-new.php1,534 ▼223.16 ▲0.06624.79 ▼60.9350.37 ▼4.18
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0796.41 ▼14.9040.20 ▼9.66

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in User_Search_History_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_user_searches
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-recent-search-history/user-search-history-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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: search history, user recent search, anonymous users search history, search history widget, logged in users recent search history

user-recent-search-history/user-search-history-widget.php 92% from 13 tests

The main PHP file in "User Recent Search History" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("user-recent-search-history.php" instead of "user-search-history-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin165 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12324165

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.30
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin