84% ajax-filter-search

Code Review | Ajax Filter Search

WordPress plugin Ajax Filter Search scored84%from 54 tests.

About plugin

  • Plugin page: ajax-filter-search
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 23, 2016
  • Latest release: Aug 6, 2016
  • Number of updates: 14
  • Update frequency: every 1.0 days
  • Top authors: longislandfreelancewebdesigner (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /4,998 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by Ajax Filter Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1346.87 ▲5.28
Dashboard /wp-admin3.46 ▲0.1253.98 ▼13.01
Posts /wp-admin/edit.php3.57 ▲0.2256.83 ▲6.67
Add New Post /wp-admin/post-new.php6.04 ▲0.1584.67 ▼12.91
Media Library /wp-admin/upload.php3.36 ▲0.1336.55 ▲0.78
Ajax Filter Search /wp-admin/options-general.php?page=ajax-filter-search3.3638.23

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

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

Browser metrics Passed 4 tests

Ajax Filter Search: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,066 ▲30515.17 ▲0.766.54 ▲4.8241.85 ▼2.67
Dashboard /wp-admin2,358 ▲1816.37 ▲0.73110.47 ▲23.1838.47 ▼2.09
Posts /wp-admin/edit.php2,289 ▲1893.53 ▲1.5149.48 ▲14.4030.45 ▼2.84
Add New Post /wp-admin/post-new.php1,546 ▲2023.91 ▲0.89663.48 ▼23.7539.10 ▼12.71
Media Library /wp-admin/upload.php1,426 ▲234.34 ▲0.1980.57 ▼23.0440.49 ▼4.89
Ajax Filter Search /wp-admin/options-general.php?page=ajax-filter-search1,0963.2739.5325.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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 50% 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
Please take a closer look at the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ajax-filter-search/ajax-filter-search.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ajax-filter-search/core/includes/shortcodes.php:259
    • > PHP Warning
      Use of undefined constant FILTER_TYPE - assumed 'FILTER_TYPE' (this will throw an Error in a future version of PHP) in wp-content/plugins/ajax-filter-search/afs-template/default.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-filter-search/core/includes/functions.php:143
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-filter-search/admin/settings.php:130
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_time() in wp-content/plugins/ajax-filter-search/afs-template/default.php:11
    • > PHP Warning
      Use of undefined constant FILTER_TYPE - assumed 'FILTER_TYPE' (this will throw an Error in a future version of PHP) in wp-content/plugins/ajax-filter-search/afs-template/default.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: ajax filter, pagination using ajax, filter posts by year, ajax search, filter posts by month...

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

The main PHP file in "Ajax Filter Search" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
80 characters long description:
Displays posts or custom post types in a friendly, filterable format using ajax.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin10,632 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
Sass67749,696
PHP6246248766
JavaScript43027111
Markdown138050
XML6006
CSS3003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1995.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
6 PNG files occupy 0.40MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png67.05KB22.65KB▼ 66.22%
assets/screenshot-3.png115.84KB37.32KB▼ 67.78%
assets/screenshot-2.png44.47KB15.23KB▼ 65.75%
assets/screenshot-6.png32.48KB11.57KB▼ 64.37%
assets/screenshot-4.png91.64KB31.31KB▼ 65.84%