77% ajax-woosearch

Code Review | Ajax WooSearch

WordPress plugin Ajax WooSearch scored77%from 54 tests.

About plugin

  • Plugin page: ajax-woosearch
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 3, 2020
  • Latest release: Jun 3, 2021
  • Number of updates: 6
  • Update frequency: every 66.3 days
  • Top authors: joysaha7302 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /516 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.89ms] Passed 4 tests

An overview of server-side resources used by Ajax WooSearch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.91 ▲2.56
Dashboard /wp-admin3.38 ▲0.0344.17 ▼15.34
Posts /wp-admin/edit.php3.49 ▲0.1346.35 ▼2.88
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.56 ▼17.82
Media Library /wp-admin/upload.php3.30 ▲0.0732.72 ▲0.49

Server storage [IO: ▲2.22MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax WooSearch
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲23513.55 ▼1.008.24 ▲6.6738.61 ▼3.69
Dashboard /wp-admin2,301 ▲1094.87 ▼0.19106.03 ▼13.6338.31 ▼13.59
Posts /wp-admin/edit.php2,172 ▲862.03 ▲0.0137.08 ▲0.5632.45 ▲0.76
Add New Post /wp-admin/post-new.php1,550 ▲3618.36 ▲0.85599.97 ▼73.1054.44 ▲3.00
Media Library /wp-admin/upload.php1,477 ▲864.23 ▲0.0195.21 ▲1.4341.47 ▲0.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • woos_wp_search
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ajax-woosearch/woo-search.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-woosearch/core/Helper/WOOSCommonHelper.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-woosearch/core/Helper/WOOSCommonHelper.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ajax-woosearch/views/setting_view.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WOOS\\Common\\WOOSBaseController' not found in wp-content/plugins/ajax-woosearch/core/Common/WOOSAdminController.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid plugin version format
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

ajax-woosearch/woo-search.php 85% from 13 tests

This is the main PHP file of "Ajax WooSearch" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ajax-woosearch.php" instead of "woo-search.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin10,299 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.59
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes15.88%
▷ Static methods1924.68%
▷ Public methods7496.10%
▷ Protected methods00.00%
▷ Private methods33.90%
▷ Named functions2095.24%
▷ Anonymous functions14.76%
▷ Global constants8100.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
8 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/donate_payment_4.png3.06KB1.72KB▼ 43.85%
images/donate_payment_5.png2.16KB1.31KB▼ 39.55%
images/donate_payment_3.png2.97KB1.67KB▼ 43.63%
images/donate_payment_1.png3.04KB1.64KB▼ 45.93%
screenshot/screenshot-2.png45.08KB16.87KB▼ 62.58%