62% spice-faq

Code Review | Spice Accordion FAQ

WordPress plugin Spice Accordion FAQ scored62%from 54 tests.

About plugin

  • Plugin page: spice-faq
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 23, 2018
  • Latest release: Nov 29, 2018
  • Number of updates: 15
  • Update frequency: every 2.5 days
  • Top authors: a.ankit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,498 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.88MB] [CPU: ▼34.52ms] Passed 4 tests

An overview of server-side resources used by Spice Accordion FAQ
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.07 ▲7.58
Dashboard /wp-admin3.07 ▼0.2426.31 ▼21.06
Posts /wp-admin/edit.php3.07 ▼0.2929.03 ▼20.32
Add New Post /wp-admin/post-new.php3.07 ▼2.8226.94 ▼86.28
Media Library /wp-admin/upload.php3.07 ▼0.1623.85 ▼10.41
FAQ Categories /wp-admin/edit-tags.php?taxonomy=spice_faq_tax&post_type=spice_faq3.0730.06
Documentation /wp-admin/edit.php?post_type=spice_faq&page=settings3.0723.88
Add New /wp-admin/post-new.php?post_type=spice_faq3.0725.60
All Items /wp-admin/edit.php?post_type=spice_faq3.0727.32

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Spice Accordion FAQ
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10314.43 ▲0.341.79 ▲0.1442.90 ▲0.40
Dashboard /wp-admin2,241 ▲534.86 ▼0.0298.21 ▼8.9438.10 ▼2.06
Posts /wp-admin/edit.php2,121 ▲322.01 ▼0.0239.99 ▼1.6535.22 ▼1.46
Add New Post /wp-admin/post-new.php1,571 ▲3818.23 ▼4.75609.29 ▼54.7753.45 ▼11.21
Media Library /wp-admin/upload.php1,423 ▲324.19 ▼0.0593.29 ▼3.4242.89 ▼1.62
FAQ Categories /wp-admin/edit-tags.php?taxonomy=spice_faq_tax&post_type=spice_faq1,4042.1434.1532.87
Documentation /wp-admin/edit.php?post_type=spice_faq&page=settings9102.0523.7323.18
Add New /wp-admin/post-new.php?post_type=spice_faq2,2847.60165.4560.85
All Items /wp-admin/edit.php?post_type=spice_faq1,0942.0129.7026.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • spice_faq_tax_children
    • spice_faq_tax_default_term_id
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=spice_faq
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/spice-faq/include/shortcodes-and-info.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/spice-faq/include/show-faq.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spice-faq/include/admin-faq.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spice-faq/spice-faq.php:58

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
The official readme.txt might help

spice-faq/spice-faq.php 92% from 13 tests

The entry point to "Spice Accordion FAQ" version 1.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected271 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48445205
CSS124951
JavaScript16615

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods150.00%
▷ Protected methods00.00%
▷ Private methods150.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png26.24KB11.18KB▼ 57.41%
include/assets/images/down.png0.34KB0.48KB0.00%
include/assets/images/up.png0.35KB0.49KB0.00%
screenshot-1.png31.82KB8.08KB▼ 74.60%