72% wp-seo-structured-data-schema

Code Review | WP SEO Structured Data Schema

WordPress plugin WP SEO Structured Data Schema scored72%from 54 tests.

About plugin

  • Plugin page: wp-seo-structured...
  • Plugin version: 2.7.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: Nov 17, 2023
  • Number of updates: 83
  • Update frequency: every 34.4 days
  • Top authors: kcseopro (100%)

Code review

54 tests

User reviews

67 reviews

Install metrics

40,000+ active /937,550 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.80MB] [CPU: ▼1.39ms] Passed 4 tests

A check of server-side resources used by WP SEO Structured Data Schema
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8342.48 ▼0.75
Dashboard /wp-admin4.13 ▲0.7947.96 ▼11.32
Posts /wp-admin/edit.php4.19 ▲0.8351.56 ▲8.19
Add New Post /wp-admin/post-new.php6.81 ▲0.9296.30 ▼1.67
Media Library /wp-admin/upload.php4.00 ▲0.7742.66 ▲8.54
WP SEO Schema /wp-admin/admin.php?page=wp-seo-schema4.2450.85
Settings /wp-admin/admin.php?page=wp-seo-schema-settings4.0446.51

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 71 new files
Database: no new tables, 8 new options
New WordPress options
kcseo_wp_installed_version
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
kcseo_wp_1_2_data_fix
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP SEO Structured Data Schema
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3614.57 ▲0.241.59 ▼0.4639.51 ▼7.83
Dashboard /wp-admin2,224 ▲475.66 ▲0.1192.59 ▼9.5773.22 ▲30.14
Posts /wp-admin/edit.php2,129 ▲262.00 ▲0.0240.58 ▲2.4434.39 ▲0.53
Add New Post /wp-admin/post-new.php10,600 ▲9,07421.57 ▼1.661,010.29 ▲321.0498.84 ▲49.50
Media Library /wp-admin/upload.php1,426 ▲294.17 ▼0.06100.30 ▼4.8863.36 ▲16.43
WP SEO Schema /wp-admin/admin.php?page=wp-seo-schema5,1943.7079.3287.83
Settings /wp-admin/admin.php?page=wp-seo-schema-settings1,3143.4650.8879.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • kcseo_wp_installed_version
    • db_upgraded
    • kcseo_wp_1_2_data_fix
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-seo-schema
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-seo-structured-data-schema/index.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-seo-structured-data-schema/lib/classes/KcSeoHooks.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-seo-structured-data-schema/lib/views/settings.php:3
    • > PHP Warning
      Use of undefined constant KCSEO_WP_SCHEMA_VERSION - assumed 'KCSEO_WP_SCHEMA_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-seo-structured-data-schema/lib/init.php on line 68
    • > PHP Warning
      Use of undefined constant KCSEO_WP_SCHEMA_URL - assumed 'KCSEO_WP_SCHEMA_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-seo-structured-data-schema/lib/init.php on line 76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-seo-structured-data-schema/lib/views/schema-options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The entry point to "WP SEO Structured Data Schema" version 2.7.10 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 143 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin9,100 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP14269935,688
JavaScript486625712,612
CSS320779800

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 315)
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity61.00
▷ Minimum class complexity2.00
▷ Maximum class complexity370.00
Average method complexity9.90
▷ Minimum method complexity1.00
▷ Maximum method complexity315.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods69
▷ Static methods2028.99%
▷ Public methods6898.55%
▷ Protected methods00.00%
▷ Private methods11.45%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants9
▷ Global constants9100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-128x128.png9.13KB3.92KB▼ 57.04%
assets/images/wp-seo-schema.png3.11KB0.76KB▼ 75.44%
assets/images/help.png0.85KB0.87KB0.00%