83% schema

Code Review | Schema

WordPress plugin Schema scored83%from 54 tests.

About plugin

  • Plugin page: schema
  • Plugin version: 1.7.9.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 11, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 829
  • Update frequency: every 3.3 days
  • Top authors: hishaman (100%)

Code review

54 tests

User reviews

213 reviews

Install metrics

50,000+ active /1,311,383 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.73MB] [CPU: ▲20.04ms] 75% from 4 tests

This is a short check of server-side resources used by Schema
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,572.46ms on /wp-admin/admin.php?page=schema-extensions)
PageMemory (MB)CPU Time (ms)
Home /4.49 ▲1.03376.14 ▲337.59
Dashboard /wp-admin5.27 ▲1.9666.31 ▲18.11
Posts /wp-admin/edit.php5.33 ▲1.9769.22 ▲17.45
Add New Post /wp-admin/post-new.php7.83 ▲1.95113.81 ▲26.23
Media Library /wp-admin/upload.php5.20 ▲1.9755.19 ▲18.35
Settings /wp-admin/admin.php?page=schema5.2153.52
What's new in Schema /wp-admin/index.php?page=schema-wp-what-is-new5.2055.18
Extensions /wp-admin/admin.php?page=schema-extensions5.432,572.46
About /wp-admin/admin.php?page=schema-wp-what-is-new5.2052.97
Getting started with Schema /wp-admin/index.php?page=schema-wp-getting-started5.2052.70
The people that build Schema /wp-admin/index.php?page=schema-wp-credits5.2052.44
Types /wp-admin/edit.php?post_type=schema5.3160.07
Schema Setup Wizard /wp-admin/index.php?page=schema-setup5.0641.83

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 140 new files
Database: no new tables, 9 new options
New WordPress options
schema_wp_version
can_compress_scripts
schema_wp_is_installed
widget_theysaidso_widget
db_upgraded
schema_wp_settings
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Schema
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲24214.26 ▲0.021.70 ▲0.0241.18 ▲0.28
Dashboard /wp-admin2,405 ▲2315.60 ▼0.0694.69 ▼11.0041.98 ▼1.94
Posts /wp-admin/edit.php2,287 ▲1872.01 ▼0.0241.99 ▲5.1335.75 ▼1.59
Add New Post /wp-admin/post-new.php6,342 ▲4,81626.14 ▲3.15811.51 ▲153.7471.85 ▲20.99
Media Library /wp-admin/upload.php1,654 ▲2574.26 ▲0.0999.39 ▼5.9774.84 ▲30.52
Settings /wp-admin/admin.php?page=schema1,4413.6265.3230.51
What's new in Schema /wp-admin/index.php?page=schema-wp-what-is-new1,3863.6650.3696.86
Extensions /wp-admin/admin.php?page=schema-extensions1,2373.7245.3838.45
About /wp-admin/admin.php?page=schema-wp-what-is-new1,3893.7049.2489.39
Getting started with Schema /wp-admin/index.php?page=schema-wp-getting-started1,2793.6142.5386.18
The people that build Schema /wp-admin/index.php?page=schema-wp-credits1,2183.5844.0432.77
Types /wp-admin/edit.php?post_type=schema1,9902.1835.6930.54
Schema Setup Wizard /wp-admin/index.php?page=schema-setup3263.3548.6469.68

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • schema_wp_version
    • can_compress_scripts
    • theysaidso_admin_options
    • schema_wp_settings
    • db_upgraded
    • schema_wp_is_installed

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/schema/includes/admin/scripts.php:43
    • > PHP Warning
      require_once(Tax-meta-class/Tax-meta-class.php): failed to open stream: No such file or directory in wp-content/plugins/schema/includes/admin/meta-tax/class-usage-demo.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'custom_add_meta_box' not found in wp-content/plugins/schema/includes/admin/meta/sample.php:161
    • > PHP Fatal error
      require_once(): Failed opening required 'Tax-meta-class/Tax-meta-class.php' (include_path='.:/usr/share/php') in wp-content/plugins/schema/includes/admin/meta-tax/class-usage-demo.php on line 13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 65 tag instead of maximum 10
The official readme.txt is a good inspiration

schema/schema.php 92% from 13 tests

The main PHP script in "Schema" version 1.7.9.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected36,172 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript172,7511,05411,010
PHP652,6624,6449,008
Sass21,01286,628
PO File62,6023,2385,826
CSS154651313,621
Markdown124061
SVG20118

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity38.62
▷ Minimum class complexity2.00
▷ Maximum class complexity202.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes16.25%
Methods192
▷ Static methods21.04%
▷ Public methods16786.98%
▷ Protected methods00.00%
▷ Private methods2513.02%
Functions208
▷ Named functions20799.52%
▷ Anonymous functions10.48%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
24 PNG files occupy 0.78MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-2.png86.52KB28.16KB▼ 67.46%
assets/images/screenshot-6.png75.27KB32.05KB▼ 57.42%
includes/admin/meta/css/chosen-sprite.png0.53KB0.88KB0.00%
includes/admin/meta-tax/images/edit.png1.54KB1.38KB▼ 10.34%
assets/images/admin-bar/google-developers.png1.21KB0.55KB▼ 54.84%