62% lightweight-faqs

Code Review | Lightweight FAQs

WordPress plugin Lightweight FAQs scored62%from 54 tests.

About plugin

  • Plugin page: lightweight-faqs
  • Plugin version: 0.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 1, 2022
  • Latest release: Apr 12, 2023
  • Number of updates: 7
  • Update frequency: every 40.7 days
  • Top authors: codechef (85.71%)ShameemReza (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /243 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.14MB] [CPU: ▼45.91ms] Passed 4 tests

Analyzing server-side resources used by Lightweight FAQs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.80 ▲3.55
Dashboard /wp-admin2.80 ▼0.5017.08 ▼35.23
Posts /wp-admin/edit.php2.81 ▼0.5516.49 ▼37.61
Add New Post /wp-admin/post-new.php2.80 ▼3.0817.67 ▼89.73
Media Library /wp-admin/upload.php2.80 ▼0.4216.68 ▼21.05
All FAQs /wp-admin/edit.php?post_type=faq2.8113.41
Add New /wp-admin/post-new.php?post_type=faq2.8118.77
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=faq2.8118.70

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
category_children
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Lightweight FAQs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲17613.98 ▼0.2610.11 ▲8.0643.71 ▼0.14
Dashboard /wp-admin2,258 ▲554.88 ▼0.99108.04 ▲0.4439.24 ▼11.07
Posts /wp-admin/edit.php2,131 ▲312.06 ▼0.0841.34 ▲2.8735.16 ▲2.03
Add New Post /wp-admin/post-new.php1,574 ▲3223.00 ▲4.82634.92 ▼24.2165.61 ▼8.27
Media Library /wp-admin/upload.php1,431 ▲314.17 ▼0.06107.35 ▼13.7244.06 ▼3.35
All FAQs /wp-admin/edit.php?post_type=faq1,1421.9531.1933.39
Add New /wp-admin/post-new.php?post_type=faq2,3097.78178.4667.39
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=faq1,4832.1531.8640.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • category_children
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=faq
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lightweight-faqs/includes/faq-posttype.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lightweight-faqs/includes/faq-shortcode.php:69
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/lightweight-faqs/widgets/faqs-widget.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=faq
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=faq 1855:5 Uncaught ReferenceError: QTags is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that require attention: Please take inspiration from this readme.txt

lightweight-faqs/lightweight-faqs.php 85% from 13 tests

The principal PHP file in "Lightweight FAQs" v. 0.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 153 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin343 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP539139283
CSS24045
JavaScript32715

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.22
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods18
▷ Static methods15.56%
▷ Public methods1688.89%
▷ Protected methods211.11%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin