84% simplewp-post-filter

Code Review | SimpleWP Post Filter Plugin for WordPress

WordPress plugin SimpleWP Post Filter Plugin for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: simplewp-post-filter
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2022
  • Latest release: Nov 28, 2022
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: chitracreation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.25ms] Passed 4 tests

This is a short check of server-side resources used by SimpleWP Post Filter Plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.73 ▼6.18
Dashboard /wp-admin3.39 ▲0.0950.83 ▼5.81
Posts /wp-admin/edit.php3.50 ▲0.1546.80 ▼7.43
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.64 ▼9.57
Media Library /wp-admin/upload.php3.31 ▲0.0840.69 ▲0.87

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

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

Browser metrics Passed 4 tests

SimpleWP Post Filter Plugin for WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.47 ▼0.8210.58 ▲8.2538.33 ▼7.03
Dashboard /wp-admin2,209 ▲325.58 ▼0.0188.07 ▲0.4438.97 ▼4.03
Posts /wp-admin/edit.php2,111 ▲82.01 ▲0.0240.15 ▼4.0334.88 ▼1.20
Add New Post /wp-admin/post-new.php1,543 ▲1523.38 ▲0.16614.20 ▼79.6264.67 ▲8.75
Media Library /wp-admin/upload.php1,417 ▲144.19 ▼0.0199.41 ▼2.1645.21 ▼2.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-2.php on line 7
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-1.php on line 1
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-1.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-2.php:14
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-1.php on line 9
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-1.php on line 3
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-2.php on line 9
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-2.php on line 5
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-1.php on line 5
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/simplewp-post-filter/frontend/grid/layout-2.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: show, column, grid, posts, filter...

simplewp-post-filter/wp-post-filter.php 85% from 13 tests

The main file in "SimpleWP Post Filter Plugin for WordPress" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simplewp-post-filter.php" instead of "wp-post-filter.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,184 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13146239907
JavaScript25028141
CSS2183295
SVG30041

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
No PNG images were found in this plugin