68% advance-search

Code Review | Advanced Search

WordPress plugin Advanced Search scored 68% from 54 tests.

About plugin

  • Plugin page: advance-search
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Jun 1, 2020
  • Latest release: Jan 31, 2022
  • Number of updates: 11
  • Update frequency: every 58.4 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 3,345 total downloads

Benchmarks

Plugin footprint 65% 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.44MB] [CPU: ▼292.46ms] Passed 4 tests

An overview of server-side resources used by Advanced Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.4959.22 ▲10.57
Dashboard /wp-admin3.85 ▲0.4439.40 ▲6.34
Posts /wp-admin/edit.php4.08 ▲0.4438.63 ▲0.05
Add New Post /wp-admin/post-new.php7.37 ▲0.40102.59 ▼1,172.56
Media Library /wp-admin/upload.php3.80 ▲0.5025.09 ▼3.68
Search Statistics /wp-admin/admin.php?page=wpas-statistics3.7327.17
Advanced Search /wp-admin/admin.php?page=advance-search3.8029.23
Export/Import /wp-admin/admin.php?page=wpas_export_import3.7325.87
Help & Update /wp-admin/admin.php?page=wpas_help_update3.7427.42

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 76 new files
Database: 1 new table, 3 new options
New tables
wp_wpas_index
New WordPress options
advance-search_default_woo_search
advance-search_default_search
advance-search_shortcode_number

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,020 ▲26617.29 ▲1.5510.93 ▲4.952.19 ▼0.22
Dashboard /wp-admin2,992 ▲1346.54 ▲0.39121.00 ▼15.40171.50 ▲9.86
Posts /wp-admin/edit.php2,788 ▲1003.25 ▼0.1165.20 ▲3.86162.78 ▲20.83
Add New Post /wp-admin/post-new.php1,851 ▲7220.11 ▼1.38400.14 ▼56.12177.34 ▲21.93
Media Library /wp-admin/upload.php1,792 ▲945.90 ▲0.42123.88 ▼20.12205.94 ▲25.73
Search Statistics /wp-admin/admin.php?page=wpas-statistics1,3693.4088.05165.58
Advanced Search /wp-admin/admin.php?page=advance-search1,5693.4267.34180.91
Export/Import /wp-admin/admin.php?page=wpas_export_import1,3953.3865.48165.05
Help & Update /wp-admin/admin.php?page=wpas_help_update1,6453.4266.38190.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_wpas_index
  • Zombie WordPress options were found after uninstall: 3 options
    • advance-search_shortcode_number
    • advance-search_default_search
    • advance-search_default_woo_search

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/advance-search/inc/frontend/views/html-advance-search-public-display.php
    • > /wp-content/plugins/advance-search/inc/admin/call-to-action-editable.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/advance-search/inc/admin/views/help-update.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/advance-search/inc/admin/views/wpas_popup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/advance-search/inc/admin/views/html-advance-search-admin-options.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/advance-search/inc/admin/views/search-statistics.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/advance-search/inc/admin/views/import-export.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/advance-search/inc/admin/views/wpas-search.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

advance-search/advance-search.php 92% from 13 tests

"Advanced Search" version 1.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 277 characters long)

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 plugin10,283 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS92431193,694
PHP216987892,914
SVG7032,732
PO File2222332484
JavaScript584122459

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.89
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods57
▷ Static methods35.26%
▷ Public methods5189.47%
▷ Protected methods00.00%
▷ Private methods610.53%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants7
▷ Global constants7100.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
7 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/images/import-export.png11.43KB11.30KB▼ 1.09%
inc/admin/images/b-back.png1.84KB0.87KB▼ 53.05%
inc/admin/images/btn-arrow-icon.png1.61KB0.67KB▼ 58.35%
inc/admin/images/icon.png1.38KB0.80KB▼ 42.52%
inc/admin/images/fm_close_icon.png0.44KB0.43KB▼ 1.78%