84% display-post-metadata

Code Review | Display Post Metadata

WordPress plugin Display Post Metadata scored84%from 54 tests.

About plugin

  • Plugin page: display-post-meta...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: May 16, 2023
  • Number of updates: 40
  • Update frequency: every 62.0 days
  • Top authors: fahidjavid (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /12,340 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.03MB] [CPU: ▼3.00ms] Passed 4 tests

Analyzing server-side resources used by Display Post Metadata
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.91 ▲1.71
Dashboard /wp-admin3.34 ▲0.0447.99 ▼5.38
Posts /wp-admin/edit.php3.39 ▲0.0349.04 ▲1.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.28 ▼9.36
Media Library /wp-admin/upload.php3.26 ▲0.0336.11 ▲2.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Display Post Metadata
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.39 ▼1.351.83 ▲0.1741.59 ▼0.40
Dashboard /wp-admin2,211 ▲235.85 ▲0.9593.55 ▼11.7239.54 ▼1.05
Posts /wp-admin/edit.php2,094 ▲22.01 ▲0.0239.13 ▲1.9133.46 ▲2.60
Add New Post /wp-admin/post-new.php1,525 ▲11423.23 ▲5.20695.37 ▲134.5755.77 ▲17.83
Media Library /wp-admin/upload.php1,390 ▼14.36 ▲0.1795.23 ▼2.2740.14 ▼3.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/display-post-metadata/display-post-metadata.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/display-post-metadata/include/views.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
Please fix the following attributes: The official readme.txt might help

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

This is the main PHP file of "Display Post Metadata" version 1.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
77 characters long description:
Allows you to display posts and pages metadata information and custom fields.

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
Everything looks great! No dangerous files found in this plugin500 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG503176
PHP344102131
JavaScript12513122
CSS213571

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin