68% nice-faqs-from-nit

Code Review | Nice FAQs from NIT

WordPress plugin Nice FAQs from NIT scored68%from 54 tests.

About plugin

  • Plugin page: nice-faqs-from-nit
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 23, 2018
  • Latest release: Oct 19, 2018
  • Number of updates: 4
  • Update frequency: every 27.8 days
  • Top authors: luisfbmelo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /602 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.20MB] [CPU: ▼42.99ms] Passed 4 tests

A check of server-side resources used by Nice FAQs from NIT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6913.99 ▼25.80
Dashboard /wp-admin2.81 ▼0.5016.24 ▼32.60
Posts /wp-admin/edit.php2.81 ▼0.5516.53 ▼35.95
Add New Post /wp-admin/post-new.php2.81 ▼3.0817.30 ▼77.59
Media Library /wp-admin/upload.php2.81 ▼0.4217.41 ▼17.07
Add New /wp-admin/post-new.php?post_type=faqs2.8118.90
FAQ Categories /wp-admin/edit-tags.php?taxonomy=categorias-faqs&post_type=faqs2.8116.38
All FAQs /wp-admin/edit.php?post_type=faqs2.8116.56

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Nice FAQs from NIT
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.60 ▼0.945.10 ▲2.4939.53 ▼4.10
Dashboard /wp-admin2,242 ▲545.77 ▼0.1395.00 ▼6.5041.00 ▼3.50
Posts /wp-admin/edit.php2,122 ▲301.99 ▼0.0140.22 ▼2.8635.98 ▲0.04
Add New Post /wp-admin/post-new.php1,542 ▲2317.83 ▼5.27596.17 ▼36.8151.77 ▲1.43
Media Library /wp-admin/upload.php1,421 ▲394.22 ▲0.0396.77 ▼1.3340.42 ▼1.83
Add New /wp-admin/post-new.php?post_type=faqs1,51316.90843.3128.87
FAQ Categories /wp-admin/edit-tags.php?taxonomy=categorias-faqs&post_type=faqs1,2952.1427.0827.46
All FAQs /wp-admin/edit.php?post_type=faqs1,0911.9530.6329.37

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=faqs
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

SRP 50% 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
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_term_by() in wp-content/plugins/nice-faqs-from-nit/views/list.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'NitFAQ\\Interfaces\\iWithTax' not found in wp-content/plugins/nice-faqs-from-nit/inc/cpt/FAQs.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NitFAQ\\plugin_dir_path() in wp-content/plugins/nice-faqs-from-nit/index.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'NitFAQ\\Interfaces\\iTax' not found in wp-content/plugins/nice-faqs-from-nit/inc/tax/catFaqs.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: faqs, government, azores

nice-faqs-from-nit/index.php 92% from 13 tests

The primary PHP file in "Nice FAQs from NIT" version 1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nice-faqs-from-nit.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected531 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP711571366
CSS212059
PO File1152050
JavaScript24936
Markdown18020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces5
Interfaces2
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods1967.86%
▷ Protected methods00.00%
▷ Private methods932.14%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin