84% faq-module-for-divi

Code Review | Faq Module For Divi

WordPress plugin Faq Module For Divi scored84%from 54 tests.

About plugin

  • Plugin page: faq-module-for-divi
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5
  • WordPress version: 6.3.1
  • First release: Feb 1, 2020
  • Latest release: Aug 12, 2020
  • Number of updates: 11
  • Update frequency: every 17.9 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.86ms] Passed 4 tests

This is a short check of server-side resources used by Faq Module For Divi
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.13 ▼5.93
Dashboard /wp-admin3.42 ▲0.0847.56 ▼15.98
Posts /wp-admin/edit.php3.47 ▲0.1251.09 ▲1.74
Add New Post /wp-admin/post-new.php5.94 ▲0.0596.66 ▼6.69
Media Library /wp-admin/upload.php3.28 ▲0.0535.36 ▼2.84
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.3533.69

Server storage [IO: ▲0.70MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Faq Module For Divi: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.76 ▲0.411.64 ▼0.1845.08 ▲3.54
Dashboard /wp-admin2,225 ▲485.67 ▲0.0990.86 ▲0.5247.18 ▲5.07
Posts /wp-admin/edit.php2,142 ▲422.11 ▲0.1042.22 ▲5.0841.25 ▲3.71
Add New Post /wp-admin/post-new.php1,552 ▲2623.54 ▲0.40615.01 ▼66.5645.38 ▼17.71
Media Library /wp-admin/upload.php1,435 ▲354.22 ▲0.03101.36 ▼15.0246.83 ▼1.47
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9712.0925.6331.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/faq-module-for-divi/includes/modules/FaqModule/FaqModule.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/faq-module-for-divi/includes/libraries/TGM-Plugin-Activation-2.6.1/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/faq-module-for-divi/includes/libraries/TGM-Plugin-Activation-2.6.1/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/faq-module-for-divi/includes/FaqModuleForDiviTheme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/faq-module-for-divi/faq-module-for-divi.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

faq-module-for-divi/faq-module-for-divi.php 92% from 13 tests

The entry point to "Faq Module For Divi" version 2.1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected8,147 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PO File171,4491,9934,842
PHP86081,8412,517
Markdown41850778
JavaScript54310

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity33.36
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods118
▷ Static methods54.24%
▷ Public methods9580.51%
▷ Protected methods2319.49%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin