84% ajax-post-filter

Code Review | Ajax Post Filter

WordPress plugin Ajax Post Filter scored84%from 54 tests.

About plugin

  • Plugin page: ajax-post-filter
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 5, 2011
  • Latest release: Jun 14, 2012
  • Number of updates: 35
  • Update frequency: every 7.3 days
  • Top authors: irvingswiftj (80%)Matthew Burrows (22.86%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /6,435 total downloads


Plugin footprint 83% from 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.05MB] [CPU: ▼1.27ms] Passed 4 tests

This is a short check of server-side resources used by Ajax Post Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.74 ▲2.60
Dashboard /wp-admin3.36 ▲0.0546.80 ▼0.88
Posts /wp-admin/edit.php3.41 ▲0.0548.09 ▼0.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.13 ▼2.79
Media Library /wp-admin/upload.php3.28 ▲0.0534.81 ▼0.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax Post Filter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.66 ▼0.955.17 ▲3.4448.56 ▲10.54
Dashboard /wp-admin2,216 ▲284.87 ▼0.18103.56 ▲1.6142.87 ▼2.69
Posts /wp-admin/edit.php2,099 ▲72.02 ▲0.0240.45 ▼2.5135.60 ▼1.57
Add New Post /wp-admin/post-new.php1,529 ▼1318.08 ▲0.06608.99 ▼6.1043.32 ▼8.41
Media Library /wp-admin/upload.php1,398 ▲74.24 ▲0.0596.98 ▼5.2343.41 ▼1.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ajax-post-filter/ajax-filter.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (An example of the shortcode)
You can take inspiration from this readme.txt

ajax-post-filter/ajax-filter.php 92% from 13 tests

The primary PHP file in "Ajax Post Filter" version 1.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ajax-post-filter.php" instead of "ajax-filter.php")

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
Everything looks great! No dangerous files found in this plugin396 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity24.00
▷ Minimum class complexity11.00
▷ Maximum class complexity37.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png6.45KB3.36KB▼ 47.93%