84% answering-contact-form-faq-page-add-on

Code Review | Answering Contact Form FAQ Page Add-on

WordPress plugin Answering Contact Form FAQ Page Add-on scored84%from 54 tests.

About plugin

  • Plugin page: answering-contact...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Nov 12, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: devmatte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,118 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.89ms] Passed 4 tests

An overview of server-side resources used by Answering Contact Form FAQ Page Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.95 ▲0.59
Dashboard /wp-admin3.31 ▲0.0151.16 ▼0.33
Posts /wp-admin/edit.php3.36 ▲0.0149.71 ▼1.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.67 ▼14.21
Media Library /wp-admin/upload.php3.23 ▲0.0137.94 ▲1.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Answering Contact Form FAQ Page Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲11113.38 ▼0.908.89 ▲6.7041.55 ▼2.96
Dashboard /wp-admin2,195 ▲285.63 ▼0.0385.84 ▼32.8240.62 ▼5.97
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0336.32 ▼1.0730.83 ▼5.56
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▲0.30652.44 ▼21.7963.82 ▲5.33
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.1199.01 ▼8.4648.92 ▲4.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • 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)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/answering-contact-form-faq-page-add-on/answering_contact_form_faq_page_add_on.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: faq page, jquery, toggle, faq, frequently asked question...

answering-contact-form-faq-page-add-on/answering_contact_form_faq_page_add_on.php 85% from 13 tests

"Answering Contact Form FAQ Page Add-on" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("answering-contact-form-faq-page-add-on.php" instead of "answering_contact_form_faq_page_add_on.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 167 characters long)

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
Success! There were no dangerous files found in this plugin87 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS16054
PHP16922
JavaScript11011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/faq-toggle-minus.png14.19KB0.10KB▼ 99.28%
css/images/faq-toggle-plus.png1.01KB0.10KB▼ 89.62%