77% advanced-faq-creator-by-category

Code Review | Advanced FAQ QA Creator by Category

WordPress plugin Advanced FAQ QA Creator by Category scored77%from 54 tests.

About plugin

  • Plugin page: advanced-faq-crea...
  • Plugin version: 1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2020
  • Latest release: Oct 30, 2022
  • Number of updates: 4
  • Update frequency: every 189.5 days
  • Top authors: wp-buy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.48MB] [CPU: ▲6.47ms] Passed 4 tests

Analyzing server-side resources used by Advanced FAQ QA Creator by Category
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.93 ▲1.4746.37 ▲12.68
Dashboard /wp-admin4.79 ▲1.4955.41 ▲10.52
Posts /wp-admin/edit.php4.84 ▲1.4951.46 ▲3.79
Add New Post /wp-admin/post-new.php7.34 ▲1.4689.68 ▼0.42
Media Library /wp-admin/upload.php4.72 ▲1.4944.04 ▲11.98
Main Categories /wp-admin/edit-tags.php?taxonomy=faqscategory&post_type=faqs4.7448.76
Tags /wp-admin/edit-tags.php?taxonomy=Tags&post_type=question4.7244.55
Main FAQ's /wp-admin/edit-tags.php?taxonomy=faqs&post_type=question4.7342.86
Add New Question /wp-admin/post-new.php?post_type=question4.8664.98
Dashboard /wp-admin/admin.php?page=faqs_dashboard4.6445.84
Questions /wp-admin/edit.php?post_type=question4.7744.87

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 127 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
empty_faq_message
faq_cat_page
allow_rating_faq
widget_theysaidso_widget
db_upgraded
on_UNINSTALL_REMOVE_ALL_DATA

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced FAQ QA Creator by Category
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲19313.75 ▼0.636.95 ▲5.4540.90 ▼0.50
Dashboard /wp-admin2,265 ▲885.07 ▼0.55103.59 ▲17.0842.77 ▲2.34
Posts /wp-admin/edit.php2,172 ▲722.14 ▲0.1237.31 ▲1.1130.62 ▼20.42
Add New Post /wp-admin/post-new.php1,587 ▲5022.29 ▲4.23670.76 ▲27.9838.32 ▼35.48
Media Library /wp-admin/upload.php1,473 ▲704.51 ▲0.3296.48 ▲2.8042.32 ▼1.33
Main Categories /wp-admin/edit-tags.php?taxonomy=faqscategory&post_type=faqs6,6973.8766.6342.90
Tags /wp-admin/edit-tags.php?taxonomy=Tags&post_type=question1,3372.2531.2330.68
Main FAQ's /wp-admin/edit-tags.php?taxonomy=faqs&post_type=question4,4993.8492.4391.65
Add New Question /wp-admin/post-new.php?post_type=question7,7007.89213.6469.95
Dashboard /wp-admin/admin.php?page=faqs_dashboard1,3713.3772.3491.07
Questions /wp-admin/edit.php?post_type=question1,1792.4033.3929.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • on_UNINSTALL_REMOVE_ALL_DATA
    • empty_faq_message
    • faq_cat_page
    • widget_theysaidso_widget
    • allow_rating_faq
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_2_col/template/category-footer.php
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/footer.php
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_2_col/template/footer.php
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_normal_links/template/category-footer.php
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/category-footer.php
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_normal_links/template/footer.php
  • 64× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/question.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_normal_links/template/search.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_normal_links/template/search.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/search.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/search.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-faq-creator-by-category/inc/autocomplete-search.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/advanced-faq-creator-by-category/inc/shortCode.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-faq-creator-by-category/inc/like-dislike.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-faq-creator-by-category/inc/search-options.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-faq-creator-by-category/inc/question-options.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: The official readme.txt might help

advanced-faq-creator-by-category/faq.php 77% from 13 tests

The primary PHP file in "Advanced FAQ QA Creator by Category" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-faq-creator-by-category.php" instead of "faq.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 252 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin26,403 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
SVG50129,702
PHP437983456,528
JavaScript281,2321,3365,527
CSS10802474,646

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.96
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods150
▷ Static methods1610.67%
▷ Public methods14596.67%
▷ Protected methods00.00%
▷ Private methods53.33%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wordpress.png27.01KB10.86KB▼ 59.80%
images/facebook.png6.20KB3.37KB▼ 45.65%
templates/AFAQCBC_collapse_2_col/screenshot.png1.88KB0.68KB▼ 63.69%
templates/AFAQCBC_collapse_full/screenshot.png1.80KB0.60KB▼ 66.52%
images/youtube.png8.60KB4.06KB▼ 52.74%