84% ask-me-anything-anonymously

Code Review | Ask Me Anything (Anonymously)

WordPress plugin Ask Me Anything (Anonymously) scored84%from 54 tests.

About plugin

  • Plugin page: ask-me-anything-a...
  • Plugin version: 1.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2016
  • Latest release: Oct 4, 2023
  • Number of updates: 27
  • Update frequency: every 100.9 days
  • Top authors: arunbasillal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /16,893 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.90ms] Passed 4 tests

Analyzing server-side resources used by Ask Me Anything (Anonymously)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1142.37 ▼0.51
Dashboard /wp-admin3.42 ▲0.0852.50 ▼13.74
Posts /wp-admin/edit.php3.48 ▲0.1249.29 ▼0.79
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.04 ▼12.57
Media Library /wp-admin/upload.php3.35 ▲0.1237.02 ▲2.06
Ask Me Anything /wp-admin/options-general.php?page=ask-me-anything-shortcode-generator3.3234.51

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

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

Browser metrics Passed 4 tests

Ask Me Anything (Anonymously): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.14 ▼0.641.83 ▲0.2344.29 ▲2.86
Dashboard /wp-admin2,202 ▲225.63 ▼0.0497.71 ▲5.7144.23 ▲3.20
Posts /wp-admin/edit.php2,104 ▲71.99 ▲0.0135.38 ▲0.6533.24 ▼2.41
Add New Post /wp-admin/post-new.php1,531 ▲322.96 ▲0.02654.77 ▼5.0555.59 ▲5.13
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0199.81 ▼1.4541.22 ▼2.77
Ask Me Anything /wp-admin/options-general.php?page=ask-me-anything-shortcode-generator1,3691.9023.6835.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 34
    • > PHP Notice
      Undefined index: unit_values in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 16
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 3
    • > PHP Notice
      Undefined index: multiple_properties in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 34
    • > PHP Notice
      Undefined index: color_values in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 24
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 16
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/ask-me-anything-anonymously/inc/csstidy/data-wp.inc.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: ask questions anonymously, shortcode, sarahah, qanda, ask me anything...

ask-me-anything-anonymously/ask-me-anything-anonymously.php Passed 13 tests

"Ask Me Anything (Anonymously)" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
Let your visitors as you questions anonymously and list all questions in a neat list.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin9,595 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24904555,960
PHP74411,1503,196
CSS46922373
Markdown120066

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 153)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity210.00
▷ Minimum class complexity72.00
▷ Maximum class complexity286.00
Average method complexity9.21
▷ Minimum method complexity1.00
▷ Maximum method complexity153.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods76
▷ Static methods11.32%
▷ Public methods76100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants9
▷ Global constants9100.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
There were not PNG files found in your plugin