84% business-schema-json-ld

Code Review | Business Schema JSON-LD

WordPress plugin Business Schema JSON-LD scored84%from 54 tests.

About plugin

  • Plugin page: business-schema-j...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2017
  • Latest release: Dec 4, 2017
  • Number of updates: 4
  • Update frequency: every 7.5 days
  • Top authors: poxrud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /806 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.63ms] Passed 4 tests

This is a short check of server-side resources used by Business Schema JSON-LD
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.05 ▼4.47
Dashboard /wp-admin3.47 ▲0.1648.48 ▼7.58
Posts /wp-admin/edit.php3.58 ▲0.2252.02 ▼0.38
Add New Post /wp-admin/post-new.php6.07 ▲0.1888.11 ▼14.10
Media Library /wp-admin/upload.php3.39 ▲0.1641.18 ▲3.96
Business Schema /wp-admin/options-general.php?page=businessschema3.3635.84

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/business-schema-json-ld/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Business Schema JSON-LD
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.77 ▲0.421.73 ▼0.3542.85 ▼2.30
Dashboard /wp-admin2,224 ▲245.80 ▲0.89103.08 ▼16.7643.00 ▼0.41
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0537.30 ▼2.5135.14 ▼4.77
Add New Post /wp-admin/post-new.php1,714 ▲18323.22 ▼0.01625.18 ▼9.3856.80 ▲8.19
Media Library /wp-admin/upload.php1,406 ▲94.32 ▲0.10109.68 ▲3.6350.46 ▲2.38
Business Schema /wp-admin/options-general.php?page=businessschema1,1522.0323.0828.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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 50% 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-schema-json-ld/business-schema.php:73
    • > PHP Fatal error
      Uncaught Error: Class 'BSJL_ProductInfo' not found in wp-content/plugins/business-schema-json-ld/partials/_product-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/business-schema-json-ld/uninstall.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: seo, structured data, json-ld, schemaorg, schema

business-schema-json-ld/business-schema.php 92% from 13 tests

This is the main PHP file of "Business Schema JSON-LD" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("business-schema-json-ld.php" instead of "business-schema.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected820 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1824223755
JavaScript121065

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.07
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods45
▷ Static methods12.22%
▷ Public methods3884.44%
▷ Protected methods00.00%
▷ Private methods715.56%
Functions26
▷ Named functions415.38%
▷ Anonymous functions2284.62%
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
There were not PNG files found in your plugin