10% custom-faq

Code Review | FAQ

WordPress plugin FAQ scored 10% from 54 tests.

About plugin

  • Plugin page: custom-faq
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.6
  • WordPress version: 5.8.1
  • First release: Jul 1, 2017
  • Latest release: Jul 3, 2018
  • Number of updates: 5
  • Update frequency: every 74.4 days
  • Top authors: pixeltoweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 496 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'faq_install' not found or invalid function name

Server metrics [RAM: ▲0.03MB] [CPU: ▼138.15ms] Passed 4 tests

Server-side resources used by FAQ
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.58 ▲10.49
Dashboard /wp-admin3.09 ▲0.0448.68 ▲2.75
Posts /wp-admin/edit.php3.14 ▲0.0347.22 ▲4.01
Add New Post /wp-admin/post-new.php5.45 ▲0.0187.04 ▼558.41
Media Library /wp-admin/upload.php3.03 ▲0.0332.54 ▼0.93
Faq Category /wp-admin/edit-tags.php?taxonomy=faqcategory&post_type=faq3.0332.02
All Faqs /wp-admin/edit.php?post_type=faq3.0839.98
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=faq3.0332.23
Add New /wp-admin/post-new.php?post_type=faq3.1451.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for FAQ
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,852 ▲24616.69 ▲1.0811.56 ▲0.7649.73 ▲2.22
Dashboard /wp-admin3,016 ▲825.92 ▼0.07134.68 ▼8.44112.24 ▼3.45
Posts /wp-admin/edit.php2,774 ▲352.58 ▼0.1366.59 ▲4.6688.51 ▲2.33
Add New Post /wp-admin/post-new.php1,534 ▲3618.77 ▼0.06374.61 ▲2.25108.48 ▼0.23
Media Library /wp-admin/upload.php1,860 ▲505.04 ▲0.03150.43 ▲1.21116.13 ▲2.17
Faq Category /wp-admin/edit-tags.php?taxonomy=faqcategory&post_type=faq1,7852.5055.7979.75
All Faqs /wp-admin/edit.php?post_type=faq1,4792.5470.1381.99
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=faq1,8752.5059.4081.20
Add New /wp-admin/post-new.php?post_type=faq3,1309.18214.51140.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

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 everything seems fine, this is not an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/custom-faq/faq.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=faq
    • > Network (severe)
    wp-content/plugins/faq/js/function.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

custom-faq/faq.php 85% from 13 tests

The main file in "FAQ" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 265 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-faq.php" instead of "faq.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,671 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS24074321,430
PHP289192
JavaScript22049

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin