78% woo-question

Code Review | Woo Question

WordPress plugin Woo Question scored78%from 54 tests.

About plugin

  • Plugin page: woo-question
  • Plugin version: 2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.2
  • WordPress version: 6.3.1
  • First release: Dec 2, 2015
  • Latest release: Sep 2, 2019
  • Number of updates: 9
  • Update frequency: every 152.3 days
  • Top authors: webgensis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,014 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.00MB] [CPU: ▼15.41ms] Passed 4 tests

An overview of server-side resources used by Woo Question
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.60 ▼15.93
Dashboard /wp-admin3.31 ▲0.0043.40 ▼7.68
Posts /wp-admin/edit.php3.36 ▲0.0048.78 ▲4.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.90 ▼39.37
Media Library /wp-admin/upload.php3.23 ▲0.0033.92 ▲1.35

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Woo Question
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.42 ▲0.251.63 ▼0.4236.87 ▼6.11
Dashboard /wp-admin2,206 ▲184.84 ▼1.01111.13 ▲0.8142.80 ▼4.52
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0238.04 ▲3.1936.44 ▼1.20
Add New Post /wp-admin/post-new.php1,536 ▲2223.38 ▲5.90648.82 ▼35.8649.50 ▼5.50
Media Library /wp-admin/upload.php1,385 ▼64.26 ▲0.0897.66 ▼2.8043.74 ▼0.29

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-question/woo-question.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/woo-question/Template/single-woo-questions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-question/credit_pakage_setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-question/functions/woo-questions-setting.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-question/credit_pakage_setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function insert() on null in wp-content/plugins/woo-question/credit_product.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Please add images for these screenshots: #1 (Plugin Required Plugin), #2 (Setting page layout in admin), #3 (Question page layout in admin), #4 (Question edit/replay page layout in admin), #5 (Question page in front end), #6 (Question page in front end), #7 (Front end layout), #8 (Question list page layout in front end), #9 (Question list page layout in front end), #10 (Answer page layout in front end)
The official readme.txt might help

woo-question/woo-question.php Passed 13 tests

"Woo Question" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
33 characters long description:
A Woocommerce Addon For Questions

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected14,828 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,4511,60712,658
CSS357571,286
PHP6734121884

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
17 PNG files occupy 0.42MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png22.33KB12.82KB▼ 42.59%
images/ans.png3.54KB0.92KB▼ 73.99%
screenshot-4.png46.96KB26.92KB▼ 42.69%
screenshot-2.png33.43KB19.59KB▼ 41.39%
screenshot-7.png42.91KB20.95KB▼ 51.18%