84% faq-and-answers

Code Review | FAQ And Answers

WordPress plugin FAQ And Answers scored84%from 54 tests.

About plugin

  • Plugin page: faq-and-answers
  • Plugin version: 1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.2
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Oct 14, 2023
  • Number of updates: 46
  • Update frequency: every 51.2 days
  • Top authors: abuhayat (78.26%)shehabulislam (23.91%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼0.89ms] Passed 4 tests

A check of server-side resources used by FAQ And Answers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2945.78 ▲7.82
Dashboard /wp-admin3.69 ▲0.3954.79 ▲5.36
Posts /wp-admin/edit.php3.74 ▲0.3849.32 ▼10.27
Add New Post /wp-admin/post-new.php6.21 ▲0.32102.09 ▼4.01
Media Library /wp-admin/upload.php3.55 ▲0.3242.72 ▲5.36
Developer /wp-admin/edit.php?post_type=faq_cpt&page=afaq-devloper-page3.5237.37
Add New FAQ /wp-admin/post-new.php?post_type=faq_cpt3.5949.79
FAQ And Answers /wp-admin/edit.php?post_type=faq_cpt3.5940.42

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for FAQ And Answers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.58 ▼0.818.47 ▲6.8541.59 ▼2.58
Dashboard /wp-admin2,210 ▲335.59 ▼0.0493.06 ▼2.8586.36 ▲44.81
Posts /wp-admin/edit.php2,133 ▲301.97 ▼0.0337.77 ▼4.0735.48 ▼1.51
Add New Post /wp-admin/post-new.php1,705 ▲17722.38 ▼0.70701.37 ▲7.0742.73 ▼22.73
Media Library /wp-admin/upload.php1,427 ▲244.12 ▼0.13103.81 ▼2.3263.26 ▲16.86
Developer /wp-admin/edit.php?post_type=faq_cpt&page=afaq-devloper-page8321.9924.8531.98
Add New FAQ /wp-admin/post-new.php?post_type=faq_cpt1,5892.7856.5495.38
FAQ And Answers /wp-admin/edit.php?post_type=faq_cpt1,1021.9132.4629.70

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/faq-and-answers/faq-and-answers.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/faq-and-answers/metabox/class-usage-demo.php:4
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/faq-and-answers/faq-and-answers.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: The official readme.txt is a good inspiration

faq-and-answers/faq-and-answers.php Passed 13 tests

The main PHP file in "FAQ And Answers" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Create a nice frequently asked questions area in your wordpress website /blog.

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
There were no executable files found in this plugin9,472 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript119191,0277,198
PHP32449231,083
CSS7156991,003
PO File54555180
HTML1008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity248.00
▷ Minimum class complexity248.00
▷ Maximum class complexity248.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
23 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
metabox/meta-box-class/images/delete-16.png1.74KB0.90KB▼ 48.23%
img/buynow.png22.06KB9.81KB▼ 55.52%
metabox/meta-box-class/js/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
metabox/meta-box-class/images/remove.png0.09KB0.08KB▼ 8.79%
img/upwork.png3.19KB1.05KB▼ 67.16%