10% dynamic-search-widget

Code Review | Dynamic Search Widget

WordPress plugin Dynamic Search Widget scored10%from 54 tests.

About plugin

  • Plugin page: dynamic-search-wi...
  • Plugin version: 0.14.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2
  • WordPress version: 6.3.1
  • First release: May 21, 2013
  • Latest release: May 13, 2015
  • Number of updates: 5
  • Update frequency: every 146.4 days
  • Top authors: asimeon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,412 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dynamic-search-widget/dynamic-search-widget.php+206
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.21ms] Passed 4 tests

Server-side resources used by Dynamic Search Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.59 ▼34.80
Dashboard /wp-admin2.05 ▼1.266.56 ▼40.22
Posts /wp-admin/edit.php2.05 ▼1.317.04 ▼38.19
Add New Post /wp-admin/post-new.php2.05 ▼3.844.92 ▼99.64
Media Library /wp-admin/upload.php2.05 ▼1.185.34 ▼29.28

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_dynsw
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Dynamic Search Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.424.82 ▲2.9842.81 ▼4.26
Dashboard /wp-admin2,206 ▲184.80 ▼0.10103.65 ▼14.3038.58 ▼7.43
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0138.07 ▲1.0247.30 ▲13.51
Add New Post /wp-admin/post-new.php1,533 ▼023.05 ▼0.24618.74 ▼35.3845.73 ▼10.70
Media Library /wp-admin/upload.php1,382 ▼94.16 ▼0.0694.58 ▼5.2140.09 ▼1.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/dynamic-search-widget/dynamic-search-widget.php+206
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_dynsw

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dynamic-search-widget/dynamic-search-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === dynamic-search-widget === )
You can look at the official readme.txt

dynamic-search-widget/dynamic-search-widget.php Passed 13 tests

"Dynamic Search Widget" version 0.14.01's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
Dynamic flexible ajax search widget.

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 detected211 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12419165
JavaScript15046

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin