83% webpage-custom-schema-schema-org-json-ld

Code Review | WebPage Custom Schema (Schema.org JSON-LD)

WordPress plugin WebPage Custom Schema (Schema.org JSON-LD) scored83%from 54 tests.

About plugin

  • Plugin page: webpage-custom-sc...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 4, 2022
  • Latest release: Jan 4, 2022
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: wpandrei (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.86ms] Passed 4 tests

Analyzing server-side resources used by WebPage Custom Schema (Schema.org JSON-LD)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0223.49 ▼12.40
Dashboard /wp-admin3.35 ▲0.0543.97 ▼4.47
Posts /wp-admin/edit.php3.47 ▲0.1148.25 ▼3.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.49 ▲1.25
Media Library /wp-admin/upload.php3.28 ▲0.0434.31 ▲1.51

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WebPage Custom Schema (Schema.org JSON-LD)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.26 ▼1.391.57 ▼0.4140.59 ▲2.40
Dashboard /wp-admin2,203 ▲125.81 ▲0.9398.56 ▼8.9941.34 ▼1.90
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0539.89 ▼1.3035.59 ▼3.17
Add New Post /wp-admin/post-new.php6,235 ▲4,71626.18 ▲5.00829.82 ▲166.8851.87 ▼19.09
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0296.71 ▼2.4143.66 ▼0.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/webpage-custom-schema-schema-org-json-ld/includes/class-webpage-schema-metabox.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === webpage-custom-schema-schema-org-json-ld === )
You can look at the official readme.txt

webpage-custom-schema-schema-org-json-ld/webpage-schema.php 77% from 13 tests

The primary PHP file in "WebPage Custom Schema (Schema.org JSON-LD)" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("webpage-custom-schema-schema-org-json-ld.php" instead of "webpage-schema.php")
  • Description: The description should be shorter than 140 characters (currently 150 characters long)

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
Success! There were no dangerous files found in this plugin210 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10107408210

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin