90% filter-main-query

Code Review | Filter Main Query

WordPress plugin Filter Main Query scored 90% from 54 tests.

About plugin

  • Plugin page: filter-main-query
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Nov 26, 2013
  • Latest release: Nov 26, 2013
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: alexvorn2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 822 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Filter Main Query
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.63 ▼2.33
Dashboard /wp-admin3.32 ▲0.0146.63 ▼4.64
Posts /wp-admin/edit.php3.37 ▲0.0146.31 ▼0.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.08 ▼9.06
Media Library /wp-admin/upload.php3.24 ▲0.0135.96 ▲2.55
Filter Main Query /wp-admin/plugins.php?page=filter_main_query3.2133.16

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Filter Main Query
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▼714.48 ▲1.231.88 ▼0.8143.31 ▼0.04
Dashboard /wp-admin2,210 ▲45.89 ▲1.05106.13 ▼8.1542.90 ▼3.16
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0136.96 ▲0.5637.32 ▼29.88
Add New Post /wp-admin/post-new.php1,531 ▲318.41 ▼0.09662.75 ▼4.1357.28 ▲4.39
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0198.00 ▼5.3346.66 ▼1.48
Filter Main Query /wp-admin/plugins.php?page=filter_main_query9162.0631.1745.32

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: filter, archives, home page, query, wp_query

filter-main-query/filter-main-query.php Passed 13 tests

This is the main PHP file of "Filter Main Query" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
128 characters long description:
This plugin will help you to filter the main query by category and post type. (Go to: Dashboard -> Plugins -> Filter Main Query)

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 detected650 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP413871401
CSS1340203
JavaScript18346

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin