84% post-grid-and-filter-ultimate

Code Review | Post grid and filter ultimate

WordPress plugin Post grid and filter ultimate scored84%from 54 tests.

About plugin

  • Plugin page: post-grid-and-fil...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2017
  • Latest release: Nov 27, 2023
  • Number of updates: 55
  • Update frequency: every 42.6 days
  • Top authors: wponlinesupport (76.36%)anoopranawat (25.45%)

Code review

54 tests

User reviews

32 reviews

Install metrics

7,000+ active /110,431 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
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼5.36ms] Passed 4 tests

A check of server-side resources used by Post grid and filter ultimate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3339.17 ▼2.01
Dashboard /wp-admin3.75 ▲0.4151.63 ▼18.86
Posts /wp-admin/edit.php3.80 ▲0.4549.04 ▲2.58
Add New Post /wp-admin/post-new.php6.31 ▲0.4295.64 ▼3.15
Media Library /wp-admin/upload.php3.61 ▲0.3835.90 ▲3.22

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Post grid and filter ultimate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,541 ▼1,20610.26 ▼4.451.38 ▼0.3617.65 ▼25.34
Dashboard /wp-admin2,221 ▲405.66 ▼0.02103.39 ▼5.4453.94 ▲7.83
Posts /wp-admin/edit.php2,122 ▲192.00 ▲0.0440.94 ▲4.0834.78 ▼1.41
Add New Post /wp-admin/post-new.php6,218 ▲4,69219.00 ▼4.47919.79 ▲318.6154.47 ▲1.36
Media Library /wp-admin/upload.php1,416 ▲164.16 ▼0.0295.62 ▼1.4538.30 ▼5.21

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • wpos_anylc_redirect
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • wpos_anylc_site_uid
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following items
  • 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/post-grid-and-filter-ultimate/templates/grid/design-2.php on line 9
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-2.php on line 7
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-1.php on line 3
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-2.php on line 1
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-1.php on line 5
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-1.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-1.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-2.php:14
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-2.php on line 3
    • > PHP Notice
      Undefined variable: gridcol in wp-content/plugins/post-grid-and-filter-ultimate/templates/grid/design-2.php on line 5

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

post-grid-and-filter-ultimate/post-grid-and-filter-ultimate.php Passed 13 tests

The main PHP script in "Post grid and filter ultimate" version 1.7 is automatically included on every request by WordPress
127 characters long description:
Easy to add and display post grid on your website with or without categoryies filter. Also work with Gutenberg shortcode block.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,364 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP256469352,849
JavaScript79448268
CSS51714163
SVG60082
JSON2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity16.62
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes225.00%
Methods44
▷ Static methods24.55%
▷ Public methods4090.91%
▷ Protected methods00.00%
▷ Private methods49.09%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/SlidersPack-50.png6.48KB2.79KB▼ 56.91%
assets/images/utility-50.png1.64KB0.82KB▼ 50.30%
assets/images/security-icon.png5.55KB1.43KB▼ 74.21%
wpos-plugins/assets/images/cart-2.png2.20KB1.82KB▼ 17.38%
assets/images/popup-anything-icon.png6.69KB2.25KB▼ 66.36%