94% gravity-forms-personality-quiz-add-on

Code Review | Gravity Forms Personality Quiz Add-On

WordPress plugin Gravity Forms Personality Quiz Add-On scored 94% from 54 tests.

About plugin

  • Plugin page: gravity-forms-per...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.4
  • WordPress version: 5.8.1
  • First release: Oct 1, 2014
  • Latest release: Jul 18, 2020
  • Number of updates: 21
  • Update frequency: every 100.8 days
  • Top authors: dabernathy89 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active / 12,184 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼139.23ms] Passed 4 tests

A check of server-side resources used by Gravity Forms Personality Quiz Add-On
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.15 ▲2.65
Dashboard /wp-admin3.06 ▲0.0147.66 ▼8.64
Posts /wp-admin/edit.php3.11 ▲0.0195.78 ▲48.47
Add New Post /wp-admin/post-new.php5.42 ▼0.01112.45 ▼549.48
Media Library /wp-admin/upload.php3.00 ▲0.0034.09 ▼1.45

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Gravity Forms Personality Quiz Add-On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.17 ▲0.678.50 ▼1.2449.90 ▼9.79
Dashboard /wp-admin2,967 ▲336.03 ▼0.09148.69 ▼14.57128.93 ▲9.41
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0183.40 ▲5.59102.25 ▲3.21
Add New Post /wp-admin/post-new.php1,615 ▼6821.29 ▲2.97308.40 ▼66.82120.29 ▲8.89
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.01156.42 ▲0.37124.63 ▲3.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-personality-quiz-add-on/gravity-forms-personality-quiz-addon.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: The official readme.txt is a good inspiration

gravity-forms-personality-quiz-add-on/gravity-forms-personality-quiz-addon.php 92% from 13 tests

The principal PHP file in "Gravity Forms Personality Quiz Add-On" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gravity-forms-personality-quiz-add-on.php" instead of "gravity-forms-personality-quiz-addon.php")

Code Analysis Passed 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 plugin577 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26555428
CSS216086
JavaScript216063

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity97.00
▷ Minimum class complexity97.00
▷ Maximum class complexity97.00
Average method complexity5.80
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1365.00%
▷ Protected methods735.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected