10% dw-question-answer-embed-question

Code Review | DW Question Answer - Embed Question

WordPress plugin DW Question Answer - Embed Question scored 10% from 54 tests.

About plugin

  • Plugin page: dw-question-answe...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 5.8.1
  • First release: Mar 27, 2014
  • Latest release: Jun 17, 2016
  • Number of updates: 6
  • Update frequency: every 135.7 days
  • Top authors: designwall (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 11,373 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dw-question-answer-embed-question/dwqa-embed-question.php+202
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.79MB] [CPU: ▼216.91ms] Passed 4 tests

Analyzing server-side resources used by DW Question Answer - Embed Question
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼0.995.16 ▼30.17
Dashboard /wp-admin1.86 ▼1.195.92 ▼39.71
Posts /wp-admin/edit.php1.86 ▼1.254.98 ▼43.48
Add New Post /wp-admin/post-new.php1.86 ▼3.575.55 ▼754.26
Media Library /wp-admin/upload.php1.86 ▼1.146.77 ▼27.81

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by DW Question Answer - Embed Question
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8215.93 ▲0.2710.40 ▲1.4547.83 ▼2.64
Dashboard /wp-admin2,970 ▲365.89 ▼0.07139.57 ▼0.61116.21 ▼4.54
Posts /wp-admin/edit.php2,739 ▲32.72 ▲0.0064.09 ▲0.6487.21 ▼4.77
Add New Post /wp-admin/post-new.php1,672 ▲218.85 ▼0.25358.19 ▼43.71109.57 ▼1.73
Media Library /wp-admin/upload.php1,807 ▼35.03 ▲0.01153.10 ▲7.59114.36 ▼11.96

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/dw-question-answer-embed-question/dwqa-embed-question.php+202
    Array and string offset access syntax with curly braces is deprecated

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/dw-question-answer-embed-question/templates/single-question-embed.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_status() in wp-content/plugins/dw-question-answer-embed-question/templates/question-sharer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dw-question-answer-embed-question/dwqa-embed-question.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_avatar() in wp-content/plugins/dw-question-answer-embed-question/templates/embed-question-small.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_class() in wp-content/plugins/dw-question-answer-embed-question/templates/embed-question.php:3
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/dw-question-answer-embed-question/templates/embed-question.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: answer, embed question, question

dw-question-answer-embed-question/dwqa-embed-question.php 85% from 13 tests

The main PHP file in "DW Question Answer - Embed Question" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("dw-question-answer-embed-question.php" instead of "dwqa-embed-question.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected873 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5587496
CSS180306
PO File1191955
JavaScript10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin