84% gravity-forms-upload-rules

Code Review | Gravity Forms Upload Rules

WordPress plugin Gravity Forms Upload Rules scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-upl...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jun 2, 2013
  • Latest release: Oct 2, 2016
  • Number of updates: 18
  • Update frequency: every 67.7 days
  • Top authors: entr (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

400+ active /9,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Gravity Forms Upload Rules
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.38 ▼3.86
Dashboard /wp-admin3.31 ▼0.0449.78 ▼20.49
Posts /wp-admin/edit.php3.36 ▲0.0045.89 ▼4.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.20 ▼10.07
Media Library /wp-admin/upload.php3.24 ▲0.0041.04 ▲2.87

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms Upload Rules
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.241.70 ▲0.0642.80 ▼2.38
Dashboard /wp-admin2,198 ▲215.62 ▼0.0286.96 ▼13.3135.94 ▼6.70
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0134.85 ▼1.0934.91 ▼1.22
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▲0.11669.49 ▼26.0367.08 ▲12.60
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.10102.34 ▼13.8543.19 ▼3.06

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-upload-rules/plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-forms-upload-rules/gforms-uploadrules.php:216

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: gravity-forms upload-rules upload

gravity-forms-upload-rules/plugin.php 85% from 13 tests

This is the main PHP file of "Gravity Forms Upload Rules" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gravity-forms-upload-rules.php" instead of "plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected323 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24312189
Bourne Shell1374064
JavaScript116055
Markdown113015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.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
There are no PNG files in this plugin