84% posts-filter-multiselect

Code Review | Posts filter multiselect

WordPress plugin Posts filter multiselect scored84%from 54 tests.

About plugin

  • Plugin page: posts-filter-mult...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Aug 20, 2023
  • Number of updates: 29
  • Update frequency: every 106.3 days
  • Top authors: tmatsuur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,911 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.44ms] Passed 4 tests

This is a short check of server-side resources used by Posts filter multiselect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1034.12 ▼10.57
Dashboard /wp-admin3.40 ▲0.1044.02 ▼5.37
Posts /wp-admin/edit.php3.47 ▲0.1251.89 ▲2.85
Add New Post /wp-admin/post-new.php5.98 ▲0.10103.14 ▲9.87
Media Library /wp-admin/upload.php3.32 ▲0.1040.42 ▲7.34

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
posts-filter-multiselect-db-version
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Posts filter multiselect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.27 ▼1.124.56 ▲1.9841.50 ▼3.99
Dashboard /wp-admin2,206 ▲185.83 ▼0.03112.58 ▼2.6143.93 ▲2.45
Posts /wp-admin/edit.php2,251 ▲1622.15 ▲0.1648.60 ▲12.5664.17 ▲28.44
Add New Post /wp-admin/post-new.php1,533 ▼923.26 ▲5.01703.72 ▲75.4355.75 ▲4.62
Media Library /wp-admin/upload.php1,385 ▲34.18 ▼0.07108.01 ▲6.2642.78 ▼0.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/posts-filter-multiselect/posts-filter-multiselect.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Dropdown menu of posts filter when using plug-in.) image missing
The official readme.txt might help

posts-filter-multiselect/posts-filter-multiselect.php 92% from 13 tests

Analyzing the main PHP file in "Posts filter multiselect" version 2.2.0
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 187 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
There were no executable files found in this plugin826 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP142119773
PO File1142832
CSS24620
JavaScript10191

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity72.00
▷ Minimum class complexity72.00
▷ Maximum class complexity72.00
Average method complexity6.07
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.png0.33KB0.16KB▼ 53.08%
css/themes/redmond/images/ui-icons_f9bd01_256x240.png4.44KB4.17KB▼ 6.02%
css/themes/redmond/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/themes/redmond/images/ui-icons_217bc0_256x240.png4.44KB4.17KB▼ 6.02%
screenshot-1.png9.00KB8.06KB▼ 10.42%