84% display-post-meta

Code Review | Display Post Meta

WordPress plugin Display Post Meta scored84%from 54 tests.

About plugin

  • Plugin page: display-post-meta
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jan 19, 2015
  • Number of updates: 39
  • Update frequency: every 14.7 days
  • Top authors: BrashRebel (87.18%)bretterer (15.38%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /3,904 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.03MB] [CPU: ▼3.72ms] Passed 4 tests

This is a short check of server-side resources used by Display Post Meta
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.19 ▼7.43
Dashboard /wp-admin3.33 ▲0.0352.95 ▼4.63
Posts /wp-admin/edit.php3.38 ▲0.0357.14 ▲0.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0398.80 ▼3.20
Media Library /wp-admin/upload.php3.26 ▲0.0337.40 ▲1.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Post Meta
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.99 ▲0.2040.83 ▲3.44
Dashboard /wp-admin2,195 ▲185.61 ▲0.0389.86 ▼12.0040.65 ▼1.81
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0339.97 ▼0.7936.95 ▲0.74
Add New Post /wp-admin/post-new.php1,534 ▲618.17 ▼4.82598.58 ▼30.6171.70 ▲22.34
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0297.30 ▼6.3842.63 ▲0.12

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-post-meta/display-post-meta.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: taxonomies, custom fields, post meta

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

"Display Post Meta" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
117 characters long description:
This plugin allows you to display the meta data for a post. Just click the DPM link in the toolbar to show meta info.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected212 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21839149
CSS111063

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin