84% json-structuring-markup

Code Review | JSON Structuring Markup

WordPress plugin JSON Structuring Markup scored84%from 54 tests.

About plugin

  • Plugin page: json-structuring-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Nov 16, 2017
  • Number of updates: 11
  • Update frequency: every 44.6 days
  • Top authors: sasiddiqui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,538 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
Installer ran successfully

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

An overview of server-side resources used by JSON Structuring Markup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.51 ▼17.43
Dashboard /wp-admin3.32 ▲0.0245.89 ▼0.84
Posts /wp-admin/edit.php3.37 ▲0.0153.08 ▲1.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.40 ▼7.79
Media Library /wp-admin/upload.php3.24 ▲0.0133.98 ▲2.20
Website Markup /wp-admin/admin.php?page=json-structuring-website-markup3.2129.90
Organization Markup /wp-admin/admin.php?page=json-structuring-organization-markup3.1830.40
JSON Markup /wp-admin/admin.php?page=json-structuring-markup-settings3.2131.22
NewsArticle Markup /wp-admin/admin.php?page=json-structuring-newsarticle-markup3.1829.80
Article Markup /wp-admin/admin.php?page=json-structuring-article-markup3.1830.00

Server storage [IO: ▲0.09MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

JSON Structuring Markup: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.24 ▼1.141.84 ▲0.1241.64 ▼2.85
Dashboard /wp-admin2,245 ▲574.85 ▼1.12109.51 ▲3.7942.50 ▼2.12
Posts /wp-admin/edit.php2,128 ▲361.99 ▼0.0339.31 ▼0.9536.96 ▲3.94
Add New Post /wp-admin/post-new.php1,545 ▲317.63 ▼0.54642.40 ▲51.6262.23 ▲10.00
Media Library /wp-admin/upload.php1,421 ▲334.20 ▼0.0998.27 ▲6.6845.15 ▲5.63
Website Markup /wp-admin/admin.php?page=json-structuring-website-markup9242.1624.2533.56
Organization Markup /wp-admin/admin.php?page=json-structuring-organization-markup1,2282.0622.8633.64
JSON Markup /wp-admin/admin.php?page=json-structuring-markup-settings8692.0527.4929.55
NewsArticle Markup /wp-admin/admin.php?page=json-structuring-newsarticle-markup1,0542.0622.9331.19
Article Markup /wp-admin/admin.php?page=json-structuring-article-markup1,0542.0323.3231.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=json-structuring-organization-markup
    • > Notice in wp-content/plugins/json-structuring-markup/includes/json-structuring-markup-organization.php+200
    Undefined variable: contact_type
    • > GET request to /wp-admin/admin.php?page=json-structuring-organization-markup
    • > Notice in wp-content/plugins/json-structuring-markup/includes/json-structuring-markup-organization.php+211
    Undefined variable: schema_contact_option_1_checked
    • > GET request to /wp-admin/admin.php?page=json-structuring-organization-markup
    • > Notice in wp-content/plugins/json-structuring-markup/includes/json-structuring-markup-organization.php+212
    Undefined variable: schema_contact_option_2_checked
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=json-structuring-article-markup
    • > Notice in wp-content/plugins/json-structuring-markup/includes/json-structuring-markup-article.php+45
    Trying to access array offset on value of type bool

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: schema markup, structured data, google validated, rich snippets, json...

json-structuring-markup/json-structuring-markup.php 92% from 13 tests

"JSON Structuring Markup" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 194 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,016 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP565122940
CSS11376

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin