90% posts-filter

Code Review | Posts Filter

WordPress plugin Posts Filter scored90%from 54 tests.

About plugin

  • Plugin page: posts-filter
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Jun 11, 2022
  • Number of updates: 14
  • Update frequency: every 36.1 days
  • Top authors: takashimatsuyama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by Posts Filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.31 ▼19.80
Dashboard /wp-admin3.31 ▲0.0150.89 ▲5.18
Posts /wp-admin/edit.php3.36 ▲0.0150.40 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.31 ▼9.43
Media Library /wp-admin/upload.php3.24 ▲0.0139.16 ▲1.60

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Posts Filter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.62 ▼0.755.48 ▲3.7742.36 ▼2.26
Dashboard /wp-admin2,206 ▲155.85 ▲0.02102.93 ▲1.7338.04 ▲2.52
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0138.61 ▼5.2132.66 ▼3.06
Add New Post /wp-admin/post-new.php1,534 ▲2023.24 ▲5.68657.91 ▼6.4451.86 ▼17.34
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.00100.85 ▼12.0743.41 ▼2.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% 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:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

posts-filter/posts-filter.php Passed 13 tests

The primary PHP file in "Posts Filter" version 1.3.1 is used by WordPress to initiate all plugin functionality
41 characters long description:
Filter posts by taxonomy terms with 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 plugin1,570 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS21619620
PHP54655484
JavaScript12386364
Markdown132047
PO File191142
SVG10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.75
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity6.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods10
▷ Static methods550.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin