84% display-post-types

Code Review | Display Post Types - Post Grid, post list and post sliders

WordPress plugin Display Post Types - Post Grid, post list and post sliders scored84%from 54 tests.

About plugin

  • Plugin page: display-post-types
  • Plugin version: 2.4.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Aug 23, 2019
  • Latest release: Nov 25, 2023
  • Number of updates: 22
  • Update frequency: every 70.7 days
  • Top authors: vedathemes (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active /40,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.53MB] [CPU: ▼4.03ms] Passed 4 tests

Server-side resources used by Display Post Types - Post Grid, post list and post sliders
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5836.02 ▼1.53
Dashboard /wp-admin3.86 ▲0.5645.69 ▼5.81
Posts /wp-admin/edit.php3.91 ▲0.5647.91 ▲0.37
Add New Post /wp-admin/post-new.php6.41 ▲0.5281.79 ▼9.13
Media Library /wp-admin/upload.php3.72 ▲0.4941.70 ▲8.44

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Display Post Types - Post Grid, post list and post sliders
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▼0.001.68 ▼0.0541.65 ▼4.02
Dashboard /wp-admin2,192 ▲125.61 ▼0.0190.84 ▼2.2043.51 ▲0.92
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0137.54 ▼2.7132.12 ▼2.22
Add New Post /wp-admin/post-new.php6,201 ▲4,67519.10 ▼3.83940.58 ▲333.2940.10 ▼11.93
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0395.64 ▼10.2342.09 ▼3.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_dpt_display_post_types
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/display-post-types/backend/inc/class-widget.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Display_Post_Types\\Backend\\Inc\\add_shortcode() in wp-content/plugins/display-post-types/backend/inc/class-shortcode.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Display_Post_Types\\Backend\\Inc\\add_action() in wp-content/plugins/display-post-types/backend/inc/class-block.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: post slider, post masonry, display posts, show posts, post grid

display-post-types/display-post-types.php Passed 13 tests

The main PHP file in "Display Post Types - Post Grid, post list and post sliders" ver. 2.4.1 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Filter, sort and display post, page or any post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin9,495 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript178049494,013
CSS6856403,086
PHP123991,0922,396

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity29.27
▷ Minimum class complexity2.00
▷ Maximum class complexity129.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods103
▷ Static methods3130.10%
▷ Public methods10299.03%
▷ Protected methods00.00%
▷ Private methods10.97%
Functions50
▷ Named functions00.00%
▷ Anonymous functions50100.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin