78% advanced-post-search

Code Review | Advanced Post Search

WordPress plugin Advanced Post Search scored78%from 54 tests.

About plugin

  • Plugin page: advanced-post-search
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.0
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Jun 5, 2017
  • Number of updates: 11
  • Update frequency: every 37.8 days
  • Top authors: vardumpsrl (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /4,909 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.14ms] Passed 4 tests

Analyzing server-side resources used by Advanced Post Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.57 ▲4.56
Dashboard /wp-admin3.40 ▲0.1050.29 ▼2.53
Posts /wp-admin/edit.php3.13 ▼0.2229.25 ▼19.64
Add New Post /wp-admin/post-new.php5.98 ▲0.0997.40 ▼6.26
Media Library /wp-admin/upload.php3.32 ▲0.0939.84 ▲3.87
FAQ /wp-admin/admin.php?page=aps-faq3.2933.37
Views /wp-admin/admin.php?page=aps-views3.2933.97

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

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

Browser metrics Passed 4 tests

Advanced Post Search: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.28 ▼0.381.64 ▼0.1831.08 ▼12.83
Dashboard /wp-admin2,225 ▲455.62 ▼0.0491.55 ▼2.2339.82 ▼3.03
Posts /wp-admin/edit.php2,595 ▲4922.51 ▲0.4145.20 ▲5.5445.32 ▲7.74
Add New Post /wp-admin/post-new.php1,552 ▲1722.78 ▲4.66682.48 ▲48.8556.04 ▼3.35
Media Library /wp-admin/upload.php1,431 ▲344.35 ▲0.2098.84 ▼6.8942.07 ▼18.79
FAQ /wp-admin/admin.php?page=aps-faq8561.9928.4936.89
Views /wp-admin/admin.php?page=aps-views1,0562.1724.5628.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_User_Query was called with an argument that is deprecated since version 5.9.0! who is deprecated. Use capability instead.
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > Notice in wp-content/plugins/advanced-post-search/advanced-post-search.php+150
    Undefined index: aps-action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > Notice in wp-content/plugins/advanced-post-search/advanced-post-search.php+191
    Undefined variable: checked
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > Notice in wp-content/plugins/advanced-post-search/advanced-post-search.php+201
    Undefined index: post
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > Notice in wp-content/plugins/advanced-post-search/advanced-post-search.php+201
    Trying to access array offset on value of type null
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > Notice in wp-content/plugins/advanced-post-search/advanced-post-search.php+201
    Undefined index: page

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedPostSearch\\FieldGroup' not found in wp-content/plugins/advanced-post-search/core/wp/fieldgroup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-post-search/advanced-post-search.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedPostSearch\\Field' not found in wp-content/plugins/advanced-post-search/core/wp/field.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedPostSearch\\WP\\Field' not found in wp-content/plugins/advanced-post-search/core/wp/field/select.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedPostSearch\\WP\\Field' not found in wp-content/plugins/advanced-post-search/core/wp/field/text.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedPostSearch\\WP\\Field' not found in wp-content/plugins/advanced-post-search/core/wp/field/daterange.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: custom post search, custom, acf search, search form, advanced...

advanced-post-search/advanced-post-search.php 92% from 13 tests

"Advanced Post Search" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected900 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8114524611
CSS180122
PO File13637121
JavaScript10146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes337.50%
▷ Concrete classes562.50%
▷ Final classes00.00%
Methods54
▷ Static methods47.41%
▷ Public methods4583.33%
▷ Protected methods11.85%
▷ Private methods814.81%
Functions13
▷ Named functions17.69%
▷ Anonymous functions1292.31%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin