83% snip-structured-data

Code Review | snip - Structured Data & Schema

WordPress plugin snip - Structured Data & Schema scored83%from 54 tests.

About plugin

  • Plugin page: snip-structured-data
  • Plugin version: 2.31.6
  • PHP compatiblity: 8.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2020
  • Latest release: Nov 13, 2023
  • Number of updates: 31
  • Update frequency: every 34.5 days
  • Top authors: floriansimeth (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /9,284 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 gracefully, with no errors

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

This is a short check of server-side resources used by snip - Structured Data & Schema
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.12 ▼5.05
Dashboard /wp-admin3.31 ▼0.0452.72 ▼9.68
Posts /wp-admin/edit.php3.36 ▲0.0050.14 ▲4.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.90 ▼3.55
Media Library /wp-admin/upload.php3.23 ▲0.0036.61 ▲2.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 126 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by snip - Structured Data & Schema
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.72 ▲0.371.67 ▼0.0837.41 ▼5.97
Dashboard /wp-admin2,192 ▲125.47 ▼0.1789.26 ▼10.6739.21 ▼3.48
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0439.64 ▲2.0237.11 ▼1.17
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.12614.73 ▲9.6753.37 ▲2.96
Media Library /wp-admin/upload.php1,394 ▼34.23 ▲0.0595.24 ▼11.1441.48 ▼2.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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)
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpbuddy\\rich_snippets\\_x() in wp-content/plugins/snip-structured-data/classes/view/admin/snippets/metabox/help.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: rich snippets, structured data, schema, schemaorg

snip-structured-data/rich-snippets-wordpress-plugin.php 77% from 13 tests

The main file in "snip - Structured Data & Schema" v. 2.31.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.8.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("snip-structured-data.php" instead of "rich-snippets-wordpress-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected32,619 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript132,5301,97318,552
PHP573,1305,3318,802
PO File31,4831,7164,730
CSS10156201526
SVG3009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.97
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes926.47%
Methods368
▷ Static methods7720.92%
▷ Public methods32588.32%
▷ Protected methods195.16%
▷ Private methods246.52%
Functions121
▷ Named functions75.79%
▷ Anonymous functions11494.21%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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
17 compressed PNG files occupy 1.19MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/examples/howto.png72.77KB77.65KB0.00%
img/examples/article.png66.41KB72.00KB0.00%
img/examples/corporate-contact.png66.46KB71.01KB0.00%
img/examples/preview.png38.91KB46.38KB0.00%
img/examples/book.png72.90KB78.09KB0.00%