88% advanced-post-search

Code Review | Advanced Post Search

WordPress plugin Advanced Post Search scored 88% 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: 5.9.2
  • 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,354 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.04MB] [CPU: ▼296.69ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Post Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1657.39 ▼0.18
Dashboard /wp-admin3.51 ▲0.1035.94 ▲0.29
Posts /wp-admin/edit.php3.27 ▼0.3722.40 ▼15.68
Add New Post /wp-admin/post-new.php6.98 ▲0.0197.31 ▼1,166.15
Media Library /wp-admin/upload.php3.39 ▲0.0925.92 ▼4.75
Views /wp-admin/admin.php?page=aps-views3.3623.12
FAQ /wp-admin/admin.php?page=aps-faq3.3624.14

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Post Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.83 ▲0.066.27 ▲0.052.44 ▼0.32
Dashboard /wp-admin2,933 ▲726.16 ▼0.05117.66 ▼21.11176.65 ▲7.81
Posts /wp-admin/edit.php3,279 ▲5883.37 ▲0.1375.29 ▲10.87158.47 ▲12.84
Add New Post /wp-admin/post-new.php1,928 ▲16816.93 ▼5.68472.31 ▲35.02157.95 ▼1.28
Media Library /wp-admin/upload.php1,733 ▲355.49 ▼0.04144.45 ▲0.91207.09 ▲17.57
Views /wp-admin/admin.php?page=aps-views1,3862.5856.76117.12
FAQ /wp-admin/admin.php?page=aps-faq1,0842.3662.34140.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=aps-views
    • > User deprecated in wp-includes/functions.php+5600
    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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedPostSearch\\WP\\Field' not found in wp-content/plugins/advanced-post-search/core/wp/field/daterange.php:8
    • > 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\\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/text.php:8
    • > 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

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: acf, advanced post search, custom post search, acf search, custom field...

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

This is the main PHP file of "Advanced Post Search" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and 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 | 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

A short review of cyclomatic complexity and code structure
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