10% ajax-search

Code Review | Ajax Search

WordPress plugin Ajax Search scored10%from 54 tests.

About plugin

  • Plugin page: ajax-search
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2011
  • Latest release: Jan 9, 2016
  • Number of updates: 24
  • Update frequency: every 63.3 days
  • Top authors: almos20 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,200 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
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/ajax-search/ajax-search.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; MXAjaxSearchWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.13ms] Passed 4 tests

This is a short check of server-side resources used by Ajax Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.93 ▼36.31
Dashboard /wp-admin2.10 ▼1.216.26 ▼38.49
Posts /wp-admin/edit.php2.10 ▼1.266.08 ▼43.66
Add New Post /wp-admin/post-new.php2.10 ▼3.795.66 ▼90.04
Media Library /wp-admin/upload.php2.10 ▼1.134.86 ▼28.14

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: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_mxajaxsearchwidget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Ajax Search: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15014.00 ▼0.398.39 ▲6.2543.52 ▼0.50
Dashboard /wp-admin2,209 ▲215.89 ▲1.0194.87 ▼20.7240.33 ▼7.39
Posts /wp-admin/edit.php2,092 ▼02.02 ▼0.0237.54 ▼4.7934.99 ▼1.56
Add New Post /wp-admin/post-new.php1,532 ▼1023.17 ▲4.84670.26 ▲38.1250.40 ▼5.37
Media Library /wp-admin/upload.php1,385 ▼04.26 ▲0.0598.09 ▼1.5844.93 ▲2.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ajax-search/ajax-search.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; MXAjaxSearchWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_mxajaxsearchwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 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/ajax-search/ajax-search.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: A description for screenshot #1 is missing in ajax-search/assets to your readme.txt
Please take inspiration from this readme.txt

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

The entry point to "Ajax Search" version 1.2.2 is a PHP file that has certain tags in its header comment area
32 characters long description:
Search your posts and pages live

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
Everything looks great! No dangerous files found in this plugin158 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14041158

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin