10% woo-ajax-search

Code Review | Woo AJAX Search

WordPress plugin Woo AJAX Search scored10%from 54 tests.

About plugin

  • Plugin page: woo-ajax-search
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 17, 2016
  • Latest release: Sep 17, 2016
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: anik4e (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,383 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/woo-ajax-search/includes/widgets.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; woosearch_ajax_widget has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼53.62ms] Passed 4 tests

Server-side resources used by Woo AJAX Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.31 ▼32.43
Dashboard /wp-admin2.13 ▼1.215.51 ▼55.65
Posts /wp-admin/edit.php2.13 ▼1.226.90 ▼41.72
Add New Post /wp-admin/post-new.php2.13 ▼3.755.32 ▼84.67
Media Library /wp-admin/upload.php2.13 ▼1.095.66 ▼25.15
Woo AJAX Search /wp-admin/options-general.php?page=woosearch2.134.94

Server storage [IO: ▲0.04MB] [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: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_woosearch_ajax_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo AJAX Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲14413.63 ▼0.745.30 ▲3.3737.36 ▼3.95
Dashboard /wp-admin2,213 ▲254.88 ▼0.03112.57 ▲6.2142.50 ▲0.92
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0036.82 ▲1.0931.65 ▼1.85
Add New Post /wp-admin/post-new.php1,541 ▲2222.68 ▼0.50667.75 ▼17.0663.67 ▲8.30
Media Library /wp-admin/upload.php1,392 ▲104.30 ▲0.08100.16 ▲4.1845.33 ▼0.06
Woo AJAX Search /wp-admin/options-general.php?page=woosearch8282.0326.7627.64

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/woo-ajax-search/includes/widgets.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; woosearch_ajax_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_woosearch_ajax_widget
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=woosearch
    • > Deprecated in wp-content/plugins/woo-ajax-search/includes/widgets.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; woosearch_ajax_widget has a deprecated constructor

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
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/woo-ajax-search/includes/shortcode.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-ajax-search/includes/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/woo-ajax-search/woo-ajax-search.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-ajax-search/includes/widgets.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === woo-ajax-search === )
Please take inspiration from this readme.txt

woo-ajax-search/woo-ajax-search.php Passed 13 tests

This is the main PHP file of "Woo AJAX Search" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
WooCommerce Products AJAX Searching Plugins

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin432 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55228256
CSS111132
JavaScript111644

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/search.png0.56KB0.58KB0.00%
assets/img/angle-down.png0.24KB0.24KB0.00%
assets/img/play-circle.png0.74KB0.76KB0.00%
assets/img/reload.png0.49KB0.50KB0.00%