10% stranger-questions-faq

Code Review | Stranger Questions - FAQ

WordPress plugin Stranger Questions - FAQ scored10%from 54 tests.

About plugin

  • Plugin page: stranger-question...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2019
  • Latest release: Dec 29, 2019
  • Number of updates: 2
  • Update frequency: every 100.0 days
  • Top authors: kuryk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /427 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.92MB] [CPU: ▼50.83ms] Passed 4 tests

Server-side resources used by Stranger Questions - FAQ
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.82 ▼34.42
Dashboard /wp-admin2.09 ▼1.217.59 ▼39.07
Posts /wp-admin/edit.php2.09 ▼1.275.69 ▼39.46
Add New Post /wp-admin/post-new.php2.09 ▼3.806.85 ▼90.37
Media Library /wp-admin/upload.php2.09 ▼1.145.94 ▼28.72
All FAQs /wp-admin/edit.php?post_type=sq-faq2.095.85
Add new /wp-admin/post-new.php?post_type=sq-faq2.096.48

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Stranger Questions - FAQ
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.15 ▼1.271.85 ▼0.0845.05 ▼0.70
Dashboard /wp-admin2,233 ▲485.88 ▲0.03107.24 ▲9.7338.30 ▼4.51
Posts /wp-admin/edit.php2,119 ▲272.06 ▲0.0440.60 ▼0.8336.22 ▲3.14
Add New Post /wp-admin/post-new.php1,537 ▲917.85 ▼5.15645.75 ▼15.6861.33 ▲11.76
Media Library /wp-admin/upload.php1,415 ▲274.15 ▼0.0493.68 ▼7.4742.00 ▼0.87
All FAQs /wp-admin/edit.php?post_type=sq-faq1,0861.9735.3829.40
Add new /wp-admin/post-new.php?post_type=sq-faq2,1757.54167.1767.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sq-faq
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stranger-questions-faq/stranger-questions-faq.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/stranger-questions-faq/user/views/faq-shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/stranger-questions-faq/user/views/faq-shortcode-list.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: You can look at the official readme.txt

stranger-questions-faq/stranger-questions-faq.php 85% from 13 tests

This is the main PHP file of "Stranger Questions - FAQ" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,656 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS3891032,501
PHP74672152
JavaScript1313

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
user/libs/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
user/libs/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
user/libs/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
user/libs/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
user/libs/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%