77% advanced-faq-creator-by-category

Code Review | Advanced FAQ QA Creator by Category

WordPress plugin Advanced FAQ QA Creator by Category scored 77% from 53 tests.

About plugin

  • Plugin page: advanced-faq-crea...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5.3
  • WordPress version: 5.8.1
  • First release: Nov 15, 2020
  • Latest release: Nov 19, 2020
  • Number of updates: 3
  • Update frequency: every 16.0 days
  • Top authors: wp-buy (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

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.27 ▲1.5539.30 ▲19.22
Dashboard /wp-admin4.55 ▲1.5053.16 ▲7.27
Posts /wp-admin/edit.php4.60 ▲1.5051.71 ▲6.07
Add New Post /wp-admin/post-new.php6.86 ▲1.4398.94 ▼1,026.00
Media Library /wp-admin/upload.php4.50 ▲1.5040.48 ▲0.19
Add New Question /wp-admin/post-new.php?post_type=question4.6366.14
Dashboard /wp-admin/admin.php?page=faqs_dashboard4.4942.00
Tags /wp-admin/edit-tags.php?taxonomy=Tags&post_type=question4.5036.48
Main FAQ's /wp-admin/edit-tags.php?taxonomy=faqs&post_type=question4.5242.48
Questions /wp-admin/edit.php?post_type=question4.5541.12
Main Categories /wp-admin/edit-tags.php?taxonomy=faqscategory&post_type=faqs4.5449.30

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 127 new files
Database: no new tables, 4 new options
New WordPress options
empty_faq_message
on_UNINSTALL_REMOVE_ALL_DATA
faq_cat_page
allow_rating_faq

Browser metrics Passed 4 tests

Checking browser requirements for Advanced FAQ QA Creator by Category
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,885 ▲27916.98 ▲1.4114.04 ▲4.2347.51 ▼1.93
Dashboard /wp-admin3,020 ▲1706.68 ▲0.87146.43 ▲14.20111.38 ▲13.12
Posts /wp-admin/edit.php2,796 ▲903.02 ▲0.3380.64 ▲15.38107.49 ▲16.33
Add New Post /wp-admin/post-new.php1,713 ▼14018.93 ▼0.25358.87 ▼26.44105.20 ▼2.23
Media Library /wp-admin/upload.php1,788 ▲165.48 ▲0.46127.56 ▼31.26111.92 ▼1.56
Add New Question /wp-admin/post-new.php?post_type=question8,6129.37258.10146.06
Dashboard /wp-admin/admin.php?page=faqs_dashboard1,8333.97121.92136.25
Tags /wp-admin/edit-tags.php?taxonomy=Tags&post_type=question1,7833.0569.1881.82
Main FAQ's /wp-admin/edit-tags.php?taxonomy=faqs&post_type=question6,0314.55134.06143.24
Questions /wp-admin/edit.php?post_type=question1,5032.9568.8289.07
Main Categories /wp-admin/edit-tags.php?taxonomy=faqscategory&post_type=faqs7,3664.51109.2494.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 4 options in the database
    • on_UNINSTALL_REMOVE_ALL_DATA
    • empty_faq_message
    • faq_cat_page
    • allow_rating_faq

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /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_normal_links/template/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/category-footer.php
    • > /wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/category-footer.php
  • 64× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_2_col/template/search.php on line 3
    • > 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 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_2_col/template/search.php on line 3
    • > 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 Notice
      Undefined variable: data in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/template/search.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-faq-creator-by-category/inc/pubicSittingQuestion.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-faq-creator-by-category/inc/TaxonomiesImage.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_collapse_full/data.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/advanced-faq-creator-by-category/templates/AFAQCBC_normal_links/template/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-faq-creator-by-category/inc/modall.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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 to be fixed: Please take inspiration from this readme.txt

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

The principal PHP file in "Advanced FAQ QA Creator by Category" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 252 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-faq-creator-by-category.php" instead of "faq.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
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

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/AFAQCBC_collapse_full/screenshot.png1.80KB0.60KB▼ 66.52%
images/twitter.png7.63KB3.66KB▼ 52.00%
images/youtube.png8.60KB4.06KB▼ 52.74%
images/envato.png34.24KB34.22KB0.05%
images/wordpress.png27.01KB10.86KB▼ 59.80%