84% optiontree-extension-gravity-forms

Code Review | OptionTree Extension: Gravity Forms

WordPress plugin OptionTree Extension: Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: optiontree-extens...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2012
  • Latest release: Mar 13, 2014
  • Number of updates: 9
  • Update frequency: every 62.9 days
  • Top authors: engelen (77.78%)Jesper800 (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,665 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by OptionTree Extension: Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.94 ▲0.39
Dashboard /wp-admin3.32 ▲0.0151.03 ▼0.57
Posts /wp-admin/edit.php3.37 ▲0.0147.10 ▼5.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.41 ▼12.27
Media Library /wp-admin/upload.php3.25 ▲0.0138.69 ▲3.03

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for OptionTree Extension: Gravity Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.51 ▲0.131.81 ▼0.1441.56 ▼1.56
Dashboard /wp-admin2,198 ▲215.62 ▲0.0493.74 ▲3.8839.23 ▼6.77
Posts /wp-admin/edit.php2,100 ▼32.09 ▲0.0938.51 ▼0.9232.48 ▼4.76
Add New Post /wp-admin/post-new.php1,526 ▼923.59 ▲5.34695.56 ▲71.9360.90 ▲2.27
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0696.10 ▼3.8740.54 ▼8.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/optiontree-extension-gravity-forms/option-tree-gravityforms.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

optiontree-extension-gravity-forms/option-tree-gravityforms.php 92% from 13 tests

The main PHP file in "OptionTree Extension: Gravity Forms" ver. 0.2.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("optiontree-extension-gravity-forms.php" instead of "option-tree-gravityforms.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 plugin74 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1123949
PO File13325

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.30
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected