62% simple-schema

Code Review | Simple Schema

WordPress plugin Simple Schema scored62%from 54 tests.

About plugin

  • Plugin page: simple-schema
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.8.0
  • WordPress version: 6.3.1
  • First release: Jan 6, 2014
  • Latest release: May 7, 2018
  • Number of updates: 18
  • Update frequency: every 88.1 days
  • Top authors: wisersites (83.33%)dkenzox (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,301 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼6.12MB] [CPU: ▼1,141,950.45ms] Passed 4 tests

This is a short check of server-side resources used by Simple Schema
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0519.21 ▼22.30
Dashboard /wp-admin3.63 ▼22.3723.24 ▼4,567,663.87
Posts /wp-admin/edit.php3.63 ▲0.2320.55 ▼36.35
Add New Post /wp-admin/post-new.php3.63 ▼2.3024.52 ▼79.27
Media Library /wp-admin/upload.php3.63 ▲0.3623.07 ▼15.35
Simple Schema /wp-admin/options-general.php?page=simple_schema_settings3.6322.87

Server storage [IO: ▲0.42MB] [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: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Simple Schema: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲2414.35 ▼0.181.64 ▼0.1143.09 ▲2.21
Dashboard /wp-admin2,199 ▲295.61 ▼0.0490.07 ▼3.4242.30 ▲5.02
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0937.65 ▼2.7735.30 ▲1.76
Add New Post /wp-admin/post-new.php7,934 ▲6,40818.98 ▼4.52913.02 ▲174.5550.44 ▼17.19
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.0099.04 ▼2.5442.99 ▼4.89
Simple Schema /wp-admin/options-general.php?page=simple_schema_settings2,7603.4056.3475.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/simple-schema/lib/schema-types.php+257
    Undefined index: post
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/lib/schema-types.php+257
    Undefined index: post
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/lib/schema-types.php+458
    Trying to get property 'post_title' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/view/admin/sdc_settings.php+124
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SDC_Admin::init() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/plugin-update-checker/plugin-update-checker.php+833
    strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SDC_Admin::init_menus() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SDC_Admin::i_settings() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+168
    Non-static method SDC_Admin::sdc_actions() should not be called statically
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php+198
    Undefined index: label
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php+199
    Undefined index: wrap_tag
  • 50 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php+201
    Undefined index: data-attrs
  • 51 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php+206
    Non-static method SDC_Admin::sdc_field_generator() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+224
    Non-static method SDC_Admin::create_section_for_selectbox() should not be called statically
  • 33 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+296
    Undefined index: default
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+300
    Non-static method SDC_Admin::sdc_option_name() should not be called statically
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+204
    Non-static method SDC_Admin::create_section_for_text() should not be called statically
  • 41 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+301
    Undefined index: placeholder
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+216
    Non-static method SDC_Admin::create_section_for_checkbox() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+240
    Non-static method SDC_Admin::create_section_for_image_url() should not be called statically
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+228
    Non-static method SDC_Admin::create_section_for_number() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+208
    Non-static method SDC_Admin::create_section_for_textarea() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+236
    Non-static method SDC_Admin::create_section_for_date() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+232
    Non-static method SDC_Admin::create_section_for_url() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+248
    Non-static method SDC_Admin::create_section_for_header() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Notice in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php+195
    Undefined index: itemprop
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Deprecated in wp-content/plugins/simple-schema/lib/class.sdc-admin.php+256
    Non-static method SDC_Admin::create_section_for_end_section() should not be called statically
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: page in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php on line 9
    • > PHP Warning
      Use of undefined constant SDC_DATA_CONTENT - assumed 'SDC_DATA_CONTENT' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php on line 4
    • > PHP Warning
      Use of undefined constant SDC_PLUGIN_URL - assumed 'SDC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-schema/view/admin/sdc_settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-schema/simple-schema.php:15
    • > PHP Warning
      Use of undefined constant SDC_PLUGIN_URL - assumed 'SDC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-schema/view/admin/sdc_main.php on line 2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php on line 22
    • > PHP Warning
      Use of undefined constant SDC_PLUGIN_URL - assumed 'SDC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-schema/view/admin/sdc_main.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-schema/view/admin/sdc_settings.php:7
    • > PHP Warning
      Use of undefined constant SDC_DATA_NAME - assumed 'SDC_DATA_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-schema/view/metabox/sdc_metas.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/simple-schema/resources/js/admin_js.js:129:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=simple_schema_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: metadata, local seo, microdata, markup, structured data...

simple-schema/simple-schema.php 92% from 13 tests

"Simple Schema" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected6,961 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,2341,1185,509
CSS3279141,038
JavaScript23419202
Markdown2420124
PO File2111256
JSON20032

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity46.47
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods235
▷ Static methods198.09%
▷ Public methods11649.36%
▷ Protected methods10142.98%
▷ Private methods187.66%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin