83% answerforce

Code Review | AnswerForce

WordPress plugin AnswerForce scored 83% from 54 tests.

About plugin

  • Plugin page: answerforce
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 11, 2020
  • Latest release: Sep 20, 2023
  • Number of updates: 30
  • Update frequency: every 41.0 days
  • Top authors: answerforce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 905 total downloads


Plugin footprint 83% 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.01MB] [CPU: ▼2.11ms] Passed 4 tests

Analyzing server-side resources used by AnswerForce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.01 ▼1.78
Dashboard /wp-admin3.32 ▲0.0146.54 ▼2.43
Posts /wp-admin/edit.php3.37 ▲0.0153.54 ▼0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.13 ▼4.18
Media Library /wp-admin/upload.php3.24 ▲0.0137.26 ▲3.12

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

AnswerForce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.63 ▼0.791.87 ▼0.0734.98 ▼20.18
Dashboard /wp-admin2,216 ▲284.93 ▼0.9793.36 ▼21.3686.10 ▲43.79
Posts /wp-admin/edit.php2,102 ▲132.06 ▲0.0538.74 ▼3.0739.91 ▲5.50
Add New Post /wp-admin/post-new.php1,689 ▲15524.69 ▲1.50684.33 ▲45.0280.76 ▲31.65
Media Library /wp-admin/upload.php1,401 ▲164.06 ▼0.2196.87 ▼2.70103.73 ▲61.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/answerforce/AnswerForce.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in answerforce/assets to your readme.txt
You can take inspiration from this readme.txt

answerforce/AnswerForce.php 85% from 13 tests

The main PHP script in "AnswerForce" version 2.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("answerforce.php" instead of "AnswerForce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 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
Good job! No executable or dangerous file extensions detected748 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.20MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/answerforce-logo.png0.44KB0.35KB▼ 20.35%
images/template-icon.png204.97KB55.54KB▼ 72.91%
icon-256x256.png4.48KB2.38KB▼ 46.92%