94% ajaxify-filters

Code Review | Ajaxify Filters

WordPress plugin Ajaxify Filters scored 94% from 54 tests.

About plugin

  • Plugin page: ajaxify-filters
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 5.8.1
  • First release: Apr 20, 2016
  • Latest release: Jun 29, 2021
  • Number of updates: 24
  • Update frequency: every 79.0 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,855 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼140.49ms] Passed 4 tests

Analyzing server-side resources used by Ajaxify Filters
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.15 ▲17.27
Dashboard /wp-admin3.06 ▲0.0143.17 ▼0.32
Posts /wp-admin/edit.php3.11 ▼0.0145.37 ▼8.63
Add New Post /wp-admin/post-new.php5.42 ▼0.0288.94 ▼550.27
Media Library /wp-admin/upload.php3.00 ▲0.0032.09 ▼2.72

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 94 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Ajaxify Filters
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6615.76 ▲0.129.82 ▲0.4046.73 ▼1.10
Dashboard /wp-admin2,973 ▲425.90 ▼0.07129.87 ▼9.32115.98 ▲9.44
Posts /wp-admin/edit.php2,739 ▲32.72 ▼0.0163.95 ▲3.0789.31 ▼4.02
Add New Post /wp-admin/post-new.php1,500 ▼17218.48 ▼0.24355.00 ▼3.08103.57 ▼7.07
Media Library /wp-admin/upload.php1,810 ▲35.01 ▼0.13142.78 ▼11.06118.85 ▲2.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 11× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/ajaxify-filters/core/walkers/index.php
    • > /wp-content/plugins/ajaxify-filters/images/index.php
    • > /wp-content/plugins/ajaxify-filters/core/index.php
    • > /wp-content/plugins/ajaxify-filters/js/index.php
    • > /wp-content/plugins/ajaxify-filters/widgets/index.php
    • > /wp-content/plugins/ajaxify-filters/colorpicker/index.php
    • > /wp-content/plugins/ajaxify-filters/css/index.php
    • > /wp-content/plugins/ajaxify-filters/helper/index.php
    • > /wp-content/plugins/ajaxify-filters/js/price-slider/index.php
    • > /wp-content/plugins/ajaxify-filters/css/price-slider/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

ajaxify-filters/ajaxify-filters.php 92% from 13 tests

The entry point to "Ajaxify Filters" version 1.0.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected16,211 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript152,2051,24712,638
PHP164574281,975
CSS654621,479
PO File14754119

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity31.67
▷ Minimum class complexity3.00
▷ Maximum class complexity98.00
Average method complexity8.36
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods50
▷ Static methods36.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
37 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
colorpicker/images/custom_hsb_b.png1.07KB0.82KB▼ 23.61%
colorpicker/images/custom_rgb_r.png0.99KB0.74KB▼ 25.34%
colorpicker/images/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
css/price-slider/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
colorpicker/images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%