84% jsm-pretty-json-ld

Code Review | JSM Pretty Schema JSON-LD for Yoast SEO, WooCommerce, etc.

WordPress plugin JSM Pretty Schema JSON-LD for Yoast SEO, WooCommerce, etc. scored84%from 54 tests.

About plugin

  • Plugin page: jsm-pretty-json-ld
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.0
  • WordPress version: 6.3.1
  • First release: Jun 12, 2018
  • Latest release: Oct 18, 2023
  • Number of updates: 590
  • Update frequency: every 3.3 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,114 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.77ms] Passed 4 tests

An overview of server-side resources used by JSM Pretty Schema JSON-LD for Yoast SEO, WooCommerce, etc.
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.10 ▼1.45
Dashboard /wp-admin3.32 ▲0.0143.67 ▼2.01
Posts /wp-admin/edit.php3.37 ▲0.0143.68 ▼3.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.49 ▼11.83
Media Library /wp-admin/upload.php3.24 ▲0.0133.76 ▲2.73

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for JSM Pretty Schema JSON-LD for Yoast SEO, WooCommerce, etc.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.07 ▼0.282.12 ▲0.2540.13 ▼1.61
Dashboard /wp-admin2,198 ▲235.57 ▼0.1585.57 ▼12.0037.82 ▼5.09
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0235.98 ▼3.6738.62 ▲0.63
Add New Post /wp-admin/post-new.php1,526 ▼123.22 ▲0.15654.99 ▲4.4349.60 ▼6.90
Media Library /wp-admin/upload.php1,400 ▼34.12 ▼0.0995.99 ▼2.2941.48 ▼5.87

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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

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
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jsm-pretty-json-ld/lib/filters.php
    • > /wp-content/plugins/jsm-pretty-json-ld/jsm-pretty-json-ld.php
    • > /wp-content/plugins/jsm-pretty-json-ld/lib/ext/json-format.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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
6 plugin tags: format, yoast, ldjson, pretty, seo...

jsm-pretty-json-ld/jsm-pretty-json-ld.php Passed 13 tests

"JSM Pretty Schema JSON-LD for Yoast SEO, WooCommerce, etc." version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
120 characters long description:
Re-format Schema LD+JSON / JSON-LD from Yoast SEO, WooCommerce, and others to create human readable (aka "pretty") code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin177 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48549137
PO File15524
Markdown15016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity11.67
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods666.67%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin