94% jsm-show-post-meta

Code Review | JSM's Show Post Metadata

WordPress plugin JSM's Show Post Metadata scored 94% from 54 tests.

About plugin

  • Plugin page: jsm-show-post-meta
  • Plugin version: 3.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.2
  • WordPress version: 5.9.2
  • First release: Aug 1, 2016
  • Latest release: Mar 23, 2022
  • Number of updates: 724
  • Update frequency: every 2.9 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active / 39,344 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.47MB] [CPU: ▼292.79ms] Passed 4 tests

Analyzing server-side resources used by JSM's Show Post Metadata
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0161.86 ▲3.66
Dashboard /wp-admin4.06 ▲0.6642.62 ▲4.75
Posts /wp-admin/edit.php4.29 ▲0.6546.08 ▲6.37
Add New Post /wp-admin/post-new.php7.55 ▲0.58105.43 ▼1,185.95
Media Library /wp-admin/upload.php3.94 ▲0.6433.71 ▲8.31

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by JSM's Show Post Metadata
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲4815.88 ▲0.135.91 ▲0.122.64 ▼0.21
Dashboard /wp-admin2,902 ▲446.17 ▲0.04113.86 ▼19.43161.71 ▼0.08
Posts /wp-admin/edit.php2,695 ▲13.24 ▲0.0162.76 ▼1.12137.13 ▲1.09
Add New Post /wp-admin/post-new.php1,724 ▲6317.29 ▲0.30413.32 ▼4.33176.41 ▲19.01
Media Library /wp-admin/upload.php1,708 ▲135.56 ▲0.03136.28 ▼3.80180.44 ▼2.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/jsm-show-post-meta/gettext/gettext-lib-com.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/com/util.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/config.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/ext/compressor.php
    • > /wp-content/plugins/jsm-show-post-meta/gettext/gettext-lib-config.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/post.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/com/util-wp.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/script.php
    • > /wp-content/plugins/jsm-show-post-meta/lib/com/util-metabox.php
    • > /wp-content/plugins/jsm-show-post-meta/jsm-show-post-meta.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The "Post Metadata" metabox added to admin post editing pages.)
The official readme.txt might help

jsm-show-post-meta/jsm-show-post-meta.php Passed 13 tests

The main PHP script in "JSM's Show Post Metadata" version 3.0.3 is automatically included on every request by WordPress
134 characters long description:
Show post metadata (aka custom fields) in a metabox when editing posts / pages - a great tool for debugging issues with post metadata.

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
Success! There were no dangerous files found in this plugin4,586 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP102,1128614,126
JavaScript4245112404
PO File19932
Markdown19024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity102.38
▷ Minimum class complexity3.00
▷ Maximum class complexity607.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods258
▷ Static methods23791.86%
▷ Public methods24795.74%
▷ Protected methods93.49%
▷ Private methods20.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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 files were detected