83% faq-schema-markup-faq-structured-data

Code Review | FAQ Schema Markup - FAQ Structured Data

WordPress plugin FAQ Schema Markup - FAQ Structured Data scored83%from 54 tests.

About plugin

  • Plugin page: faq-schema-markup...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 13, 2019
  • Latest release: Aug 13, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wpsunny (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /10,383 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.09MB] [CPU: ▼4.59ms] Passed 4 tests

This is a short check of server-side resources used by FAQ Schema Markup - FAQ Structured Data
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.83 ▼3.58
Dashboard /wp-admin3.33 ▲0.0251.05 ▼4.14
Posts /wp-admin/edit.php3.38 ▲0.0253.43 ▲1.95
Add New Post /wp-admin/post-new.php5.46 ▼0.4277.01 ▼12.59
Media Library /wp-admin/upload.php3.25 ▲0.0238.95 ▲2.16

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for FAQ Schema Markup - FAQ Structured Data
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▼0.351.65 ▼0.3838.69 ▼8.28
Dashboard /wp-admin2,195 ▲185.63 ▲0.0690.89 ▼15.1938.49 ▼5.42
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0440.55 ▲1.3135.87 ▲0.35
Add New Post /wp-admin/post-new.php6,257 ▲4,73126.05 ▲2.46932.37 ▲220.5860.79 ▲9.02
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.04106.57 ▲3.2544.70 ▼1.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/faq-schema-markup-faq-structured-data/schema-for-faqs.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

faq-schema-markup-faq-structured-data/schema-for-faqs.php 92% from 13 tests

This is the main PHP file of "FAQ Schema Markup - FAQ Structured Data" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("faq-schema-markup-faq-structured-data.php" instead of "schema-for-faqs.php")

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
Good job! No executable or dangerous file extensions detected235 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13318123
CSS16089
JavaScript16023

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin