84% gravity-forms-data-population

Code Review | Gravity Forms Data Population

WordPress plugin Gravity Forms Data Population scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-dat...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Dec 28, 2014
  • Latest release: Dec 28, 2014
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: travislopes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /673 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 gracefully, with no errors

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

An overview of server-side resources used by Gravity Forms Data Population
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0135.69 ▼4.99
Dashboard /wp-admin3.31 ▲0.0044.18 ▼7.12
Posts /wp-admin/edit.php3.36 ▲0.0042.40 ▼5.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.41 ▼9.58
Media Library /wp-admin/upload.php3.23 ▲0.0034.15 ▼0.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms Data Population
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.34 ▼0.951.63 ▼0.4740.23 ▼4.75
Dashboard /wp-admin2,209 ▲215.90 ▲0.04103.00 ▲1.9141.15 ▼0.60
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0034.97 ▼4.2332.99 ▼2.13
Add New Post /wp-admin/post-new.php1,533 ▼920.75 ▲2.54555.33 ▼60.8549.34 ▼13.48
Media Library /wp-admin/upload.php1,388 ▲34.24 ▼0.0597.86 ▼5.1642.93 ▼2.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-data-population/data-population.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gravity-forms-data-population/class-gf-datapopulation.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% 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
6 plugin tags: testing, population, data, gravity forms, sample data...

gravity-forms-data-population/data-population.php 92% from 13 tests

The main PHP file in "Gravity Forms Data Population" ver. 1.0.0 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: Name the main plugin file the same as the plugin slug ("gravity-forms-data-population.php" instead of "data-population.php")

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
Good job! No executable or dangerous file extensions detected165 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28237158
JavaScript1436
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin