68% wp-structured-data-schema

Code Review | Schema Plugin For Divi, Gutenberg & Shortcodes

WordPress plugin Schema Plugin For Divi, Gutenberg & Shortcodes scored68%from 54 tests.

About plugin

  • Plugin page: wp-structured-dat...
  • Plugin version: 4.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 2, 2020
  • Latest release: Aug 24, 2023
  • Number of updates: 9
  • Update frequency: every 132.4 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 65% 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: ▲5.68MB] [CPU: ▲35.53ms] 75% from 4 tests

An overview of server-side resources used by Schema Plugin For Divi, Gutenberg & Shortcodes
Please fix the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.68MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.25 ▲5.7977.64 ▲35.49
Dashboard /wp-admin9.27 ▲5.9685.88 ▲36.50
Posts /wp-admin/edit.php9.27 ▲5.9198.47 ▲49.40
Add New Post /wp-admin/post-new.php10.95 ▲5.07119.42 ▲28.91
Media Library /wp-admin/upload.php9.27 ▲6.0479.19 ▲41.23
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2767.94

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 734 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
fs_debug_mode
theysaidso_admin_options
fs_active_plugins
fs_accounts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Schema Plugin For Divi, Gutenberg & Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,139 ▲40418.68 ▲4.251.58 ▼0.3927.83 ▼16.00
Dashboard /wp-admin2,495 ▲3159.14 ▲3.28191.91 ▲73.96102.08 ▲57.32
Posts /wp-admin/edit.php2,410 ▲3216.16 ▲4.13123.30 ▲81.5776.71 ▲37.71
Add New Post /wp-admin/post-new.php1,847 ▲31421.99 ▼1.10739.86 ▲107.3642.00 ▼13.90
Media Library /wp-admin/upload.php1,546 ▲1556.50 ▲2.30114.43 ▲13.9096.38 ▲54.41
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,4205.8766.4965.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-structured-data-schema/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • widget_recent-posts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 145× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Container\\Fulfillable\\Fulfillable' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Container/Condition/Condition.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Scripts_Field' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Field/Header_Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Service/REST_API_Service.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Container/Comment_Meta_Container.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Term_Condition' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Ancestor_Condition.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Field/Color_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Widget/Widget.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Breadcrumb_Locator' not found in wp-content/plugins/wp-structured-data-schema/includes/lib/carbon-breadcrumbs/core/class-carbon-breadcrumb-locator-hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wp-structured-data-schema/vendor/htmlburger/carbon-fields/core/Field/Media_Gallery_Field.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/wp-structured-data-schema/includes/classes/Loader.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: rich snippets, schemaorg, schema markup, structured data, json-ld

wp-structured-data-schema/wp-structured-data-schema.php 92% from 13 tests

This is the main PHP file of "Schema Plugin For Divi, Gutenberg & Shortcodes" version 4.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected72,096 lines of code in 630 files:
LanguageFilesBlank linesComment linesLines of code
PHP34911,61426,95448,788
JavaScript1777,87712,13917,394
Sass4833401,746
PO File216378071,731
CSS233281,1421,675
JSON500534
reStructuredText19613997
Markdown429076
YAML17139
XML12016

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity23.51
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces40
Interfaces10
Traits0
Classes245
▷ Abstract classes197.76%
▷ Concrete classes22692.24%
▷ Final classes31.33%
Methods2,561
▷ Static methods32112.53%
▷ Public methods2,00178.13%
▷ Protected methods1837.15%
▷ Private methods37714.72%
Functions283
▷ Named functions12042.40%
▷ Anonymous functions16357.60%
Constants175
▷ Global constants10560.00%
▷ Class constants7040.00%
▷ Public constants70100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/m4.png5.57KB4.23KB▼ 24.08%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
images/m1.png2.93KB2.20KB▼ 25.07%
images/m5.png6.68KB5.10KB▼ 23.66%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%