84% c4d-woo-ajax-search

Code Review | Woocommerce Ajax Search

WordPress plugin Woocommerce Ajax Search scored84%from 54 tests.

About plugin

  • Plugin page: c4d-woo-ajax-search
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Aug 30, 2017
  • Number of updates: 11
  • Update frequency: every 17.6 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.66ms] Passed 4 tests

Server-side resources used by Woocommerce Ajax Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.18 ▼3.37
Dashboard /wp-admin3.33 ▲0.0245.65 ▼1.04
Posts /wp-admin/edit.php3.38 ▲0.0249.16 ▼0.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.43 ▲3.92
Media Library /wp-admin/upload.php3.25 ▲0.0235.80 ▲2.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Ajax Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.59 ▼0.709.68 ▲7.5542.98 ▼0.00
Dashboard /wp-admin2,206 ▲185.80 ▼0.1796.19 ▼8.4240.57 ▲0.45
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0138.86 ▼1.6635.99 ▼3.21
Add New Post /wp-admin/post-new.php1,542 ▲2818.27 ▼5.58612.57 ▼89.2550.29 ▼6.89
Media Library /wp-admin/upload.php1,385 ▲34.23 ▼0.0799.38 ▼2.1942.99 ▼4.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please 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 plugins_url() in wp-content/plugins/c4d-woo-ajax-search/c4d-woo-ajax-search.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (19 tag instead of maximum 10)
Please take inspiration from this readme.txt

c4d-woo-ajax-search/c4d-woo-ajax-search.php 92% from 13 tests

The main PHP script in "Woocommerce Ajax Search" version 2.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected208 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131988
Sass10063
JavaScript23456
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin