84% display-custom-post

Code Review | Display Custom Post

WordPress plugin Display Custom Post scored84%from 54 tests.

About plugin

  • Plugin page: display-custom-post
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2017
  • Latest release: Feb 27, 2023
  • Number of updates: 58
  • Update frequency: every 32.8 days
  • Top authors: smallbusinesswebdesign (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /11,181 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼12.35ms] Passed 4 tests

An overview of server-side resources used by Display Custom Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.49 ▼3.61
Dashboard /wp-admin3.31 ▼0.0344.12 ▼21.43
Posts /wp-admin/edit.php3.36 ▲0.0147.93 ▼2.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.52 ▼20.84
Media Library /wp-admin/upload.php3.24 ▲0.0133.93 ▼3.51

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Display Custom Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲2714.22 ▼0.421.62 ▼0.6238.68 ▼6.35
Dashboard /wp-admin2,218 ▲415.64 ▼0.0494.37 ▼2.9741.62 ▼6.59
Posts /wp-admin/edit.php2,120 ▲202.02 ▲0.0640.12 ▲1.7635.50 ▲0.92
Add New Post /wp-admin/post-new.php1,543 ▲1722.93 ▼0.39641.93 ▼42.0156.25 ▲0.80
Media Library /wp-admin/upload.php1,417 ▲174.23 ▼0.02127.82 ▲26.3452.53 ▲6.06

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-custom-post/display-custom-post.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: post grid, custom post shortcode, display custom post, wordpress custom posts, custom post...

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

The principal PHP file in "Display Custom Post" v. 2.2.1 is loaded by WordPress automatically on each request
45 characters long description:
Display Custom Posts Using a Simple Shortcode

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
Good job! No executable or dangerous file extensions detected750 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS33513424
PHP15434232
JavaScript1181394

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.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin