78% schema-for-article

Code Review | SCHEMA for Article

WordPress plugin SCHEMA for Article scored78%from 54 tests.

About plugin

  • Plugin page: schema-for-article
  • Plugin version: 0.4.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Oct 28, 2018
  • Number of updates: 47
  • Update frequency: every 21.3 days
  • Top authors: sasiddiqui (93.62%)aliya yasir (8.51%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /11,579 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.20ms] Passed 4 tests

Server-side resources used by SCHEMA for Article
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.76 ▲2.54
Dashboard /wp-admin3.34 ▲0.0353.38 ▲4.22
Posts /wp-admin/edit.php3.39 ▲0.0349.58 ▼0.85
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.48 ▼9.61
Media Library /wp-admin/upload.php3.26 ▲0.0335.68 ▼0.89
About /wp-admin/admin.php?page=schema-article-about-plugins3.2535.60
Settings /wp-admin/admin.php?page=schema-article-settings3.2734.64

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
schema_for_article_plugin_version

Browser metrics Passed 4 tests

A check of browser resources used by SCHEMA for Article
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.37 ▼0.211.64 ▲0.0244.41 ▲0.37
Dashboard /wp-admin2,225 ▲485.62 ▼0.0696.48 ▲7.8241.68 ▼0.28
Posts /wp-admin/edit.php2,127 ▲271.99 ▲0.0137.79 ▼2.0033.19 ▼3.08
Add New Post /wp-admin/post-new.php1,548 ▲2022.98 ▼0.03614.90 ▼6.1050.53 ▼4.71
Media Library /wp-admin/upload.php1,421 ▲214.15 ▲0.0497.35 ▼7.9144.98 ▲2.05
About /wp-admin/admin.php?page=schema-article-about-plugins2,3311.9225.8745.87
Settings /wp-admin/admin.php?page=schema-article-settings1,0882.1223.4131.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • schema_for_article_plugin_version
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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
    • > GET request to /wp-admin/admin.php?page=schema-article-settings
    • > Notice in wp-content/plugins/schema-for-article/admin/class-schema-for-article-settings.php+71
    Undefined variable: article_checked
    • > GET request to /wp-admin/admin.php?page=schema-article-settings
    • > Notice in wp-content/plugins/schema-for-article/admin/class-schema-for-article-settings.php+72
    Undefined variable: news_checked

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 items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/schema-for-article/schema-for-article.php
    • > /wp-content/plugins/schema-for-article/schema-for-article-main.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: structured data, schema, rich snippets, schema markup, markup...

schema-for-article/schema-for-article.php 92% from 13 tests

The main file in "SCHEMA for Article" v. 0.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected8,928 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
SVG9118,119
PHP866115544
CSS432265

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.60
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/prevent-xss-vulnerability.png7.36KB7.25KB▼ 1.51%
admin/images/media-post-permalink.png24.03KB11.56KB▼ 51.92%