84% wp-jsonld

Code Review | WP-JSONLD

WordPress plugin WP-JSONLD scored84%from 54 tests.

About plugin

  • Plugin page: wp-jsonld
  • Plugin version: 0.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2016
  • Latest release: Jan 5, 2016
  • Number of updates: 31
  • Update frequency: every 0.2 days
  • Top authors: mampf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,387 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 gracefully, with no errors

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

Analyzing server-side resources used by WP-JSONLD
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.41 ▼7.68
Dashboard /wp-admin3.32 ▲0.0145.51 ▼4.32
Posts /wp-admin/edit.php3.37 ▲0.0148.53 ▲4.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.44 ▼11.63
Media Library /wp-admin/upload.php3.24 ▲0.0140.13 ▲6.24

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

WP-JSONLD: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.39 ▼0.991.66 ▼0.2841.11 ▼6.80
Dashboard /wp-admin2,206 ▲215.87 ▼0.03100.20 ▼14.0438.20 ▼7.12
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0539.24 ▲5.0033.94 ▼5.30
Add New Post /wp-admin/post-new.php1,542 ▲1418.33 ▼0.15596.77 ▼14.9057.62 ▼1.91
Media Library /wp-admin/upload.php1,382 ▼34.18 ▲0.0198.60 ▼1.7945.78 ▲2.23

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bmarwell\\wp_jsonld\\add_action() in wp-content/plugins/wp-jsonld/wp-jsonld.php:312
    • > PHP Fatal error
      Uncaught Error: Class 'bmarwell\\wp_jsonld\\JsonLD' not found in wp-content/plugins/wp-jsonld/inc/ImageObject.class.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'bmarwell\\wp_jsonld\\JsonLD' not found in wp-content/plugins/wp-jsonld/inc/Author.class.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'bmarwell\\wp_jsonld\\JsonLD' not found in wp-content/plugins/wp-jsonld/inc/Organization.class.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'bmarwell\\wp_jsonld\\Article' not found in wp-content/plugins/wp-jsonld/inc/BlogPosting.class.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'bmarwell\\wp_jsonld\\JsonLD' not found in wp-content/plugins/wp-jsonld/inc/Article.class.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Screenshots: Add descriptions for screenshots #1, #1 in wp-jsonld/assets to your readme.txt
You can take inspiration from this readme.txt

wp-jsonld/wp-jsonld.php Passed 13 tests

"WP-JSONLD" version 0.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
106 characters long description:
WP-JSONLD adds valid schema.org microdata as JSON-LD-script to your blog posts, author pages and articles.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin267 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7126377267

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin