68% advance-search

Code Review | Advanced Search

WordPress plugin Advanced Search scored68%from 54 tests.

About plugin

  • Plugin page: advance-search
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2020
  • Latest release: May 11, 2023
  • Number of updates: 12
  • Update frequency: every 92.3 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /5,895 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▲0.08ms] Passed 4 tests

Analyzing server-side resources used by Advanced Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4448.11 ▲6.02
Dashboard /wp-admin3.74 ▲0.4047.98 ▼7.82
Posts /wp-admin/edit.php3.85 ▲0.5049.40 ▲4.79
Add New Post /wp-admin/post-new.php6.32 ▲0.4499.22 ▲0.86
Media Library /wp-admin/upload.php3.66 ▲0.4436.93 ▲2.48
Export/Import /wp-admin/admin.php?page=wpas_export_import3.6635.22
Advanced Search /wp-admin/admin.php?page=advance-search3.7337.83
Search Statistics /wp-admin/admin.php?page=wpas-statistics3.6534.09
Help & Update /wp-admin/admin.php?page=wpas_help_update3.6735.39

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 76 new files
Database: 1 new table, 9 new options
New tables
wp_wpas_index
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
advance-search_shortcode_number
db_upgraded
advance-search_default_woo_search
widget_recent-comments
advance-search_default_search
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲30213.94 ▼0.448.59 ▲6.9836.47 ▼2.29
Dashboard /wp-admin2,284 ▲995.23 ▼0.65106.42 ▼3.2982.33 ▲38.46
Posts /wp-admin/edit.php2,166 ▲772.32 ▲0.3338.56 ▲2.9135.82 ▲4.22
Add New Post /wp-admin/post-new.php6,423 ▲4,90927.83 ▲10.28860.84 ▲172.0439.47 ▼19.80
Media Library /wp-admin/upload.php1,463 ▲784.39 ▲0.13101.18 ▲1.2848.12 ▲2.61
Export/Import /wp-admin/admin.php?page=wpas_export_import1,1032.4555.3044.85
Advanced Search /wp-admin/admin.php?page=advance-search1,2142.3438.7250.02
Search Statistics /wp-admin/admin.php?page=wpas-statistics1,0732.3238.8037.96
Help & Update /wp-admin/admin.php?page=wpas_help_update1,2552.2038.4255.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wpas_index
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • advance-search_default_woo_search
    • theysaidso_admin_options
    • advance-search_shortcode_number
    • advance-search_default_search
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/advance-search/inc/admin/call-to-action-editable.php
    • > /wp-content/plugins/advance-search/inc/frontend/views/html-advance-search-public-display.php
  • 6× PHP files trigger server errors when accessed directly:
    • > 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/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/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/wpas-search.php:14
    • > 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/import-export.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The primary PHP file in "Advanced Search" version 1.1.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 277 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected10,442 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS92431213,828
PHP217007892,934
SVG7032,732
PO File2222332484
JavaScript590122464

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity19.22
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity49.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

All PNG images should be compressed to minimize bandwidth usage for end users
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-stat.png1.87KB1.00KB▼ 46.65%
inc/admin/images/b-back.png1.84KB0.87KB▼ 53.05%
inc/admin/images/btn-arrow-icon.png1.61KB0.67KB▼ 58.35%
inc/admin/images/statistics.png75.30KB78.74KB0.00%