77% atalki-ai-based-faq-generator

Code Review | ATALKI - AI Based FAQ Generator

WordPress plugin ATALKI - AI Based FAQ Generator scored77%from 54 tests.

About plugin

  • Plugin page: atalki-ai-based-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 12, 2022
  • Latest release: Mar 12, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: atalki (100%)Otto42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.54ms] Passed 4 tests

Server-side resources used by ATALKI - AI Based FAQ Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.48 ▼4.19
Dashboard /wp-admin3.43 ▲0.1253.03 ▲2.57
Posts /wp-admin/edit.php3.54 ▲0.1848.18 ▼3.45
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.21 ▼7.21
Media Library /wp-admin/upload.php3.35 ▲0.1234.10 ▼3.29
FAQ List /wp-admin/admin.php?page=afg-faq-list3.34497.87
Atalki - FAQ Generator /wp-admin/admin.php?page=atalki-faq-generator3.3334.49
Login / Sign Up /wp-admin/admin.php?page=afg-login-signup3.3332.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for ATALKI - AI Based FAQ Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.60 ▼0.995.52 ▲3.7738.85 ▼5.22
Dashboard /wp-admin2,234 ▲435.83 ▲0.9296.73 ▼1.5938.87 ▼3.98
Posts /wp-admin/edit.php2,117 ▲252.04 ▲0.0835.96 ▼8.4231.65 ▼7.01
Add New Post /wp-admin/post-new.php1,557 ▲3823.07 ▼0.10675.84 ▲72.6052.70 ▼0.41
Media Library /wp-admin/upload.php1,416 ▲284.19 ▼0.15100.70 ▼4.4543.09 ▼2.41
FAQ List /wp-admin/admin.php?page=afg-faq-list7271.9025.7451.60
Atalki - FAQ Generator /wp-admin/admin.php?page=atalki-faq-generator8761.8630.1158.91
Login / Sign Up /wp-admin/admin.php?page=afg-login-signup9701.8531.8269.32

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/atalki-ai-based-faq-generator/admin/partials/atalki-faq-generator-admin-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_admin() on null in wp-content/plugins/atalki-ai-based-faq-generator/admin/partials/afg-link-page-html.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/atalki-ai-based-faq-generator/admin/partials/afg-faq-list-html.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/atalki-ai-based-faq-generator/public/partials/atalki-faq-generator-public-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: ai, atalki, faqs, faq-generator

atalki-ai-based-faq-generator/atalki-faq-generator.php 77% from 13 tests

The main file in "ATALKI - AI Based FAQ Generator" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("atalki-ai-based-faq-generator.php" instead of "atalki-faq-generator.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,049 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP16267586961
CSS414542954
JavaScript32081125
SVG1009

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.71
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 2.27MB with 1.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/Atalki illustration 2.png112.31KB47.25KB▼ 57.93%
admin/images/google.png4.54KB2.65KB▼ 41.59%
admin/images/Atalki illustration 1.png147.58KB60.06KB▼ 59.31%
admin/images/facebook-app-symbol.png9.29KB2.87KB▼ 69.16%
admin/images/Image 9.png129.40KB44.47KB▼ 65.63%