84% gravityform-to-custom-post

Code Review | GravityForm to Custom Post

WordPress plugin GravityForm to Custom Post scored84%from 54 tests.

About plugin

  • Plugin page: gravityform-to-cu...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2015
  • Latest release: Feb 11, 2015
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: mukkiee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by GravityForm to Custom Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.40 ▼7.22
Dashboard /wp-admin3.32 ▲0.0151.62 ▼6.06
Posts /wp-admin/edit.php3.37 ▲0.0149.06 ▼5.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.59 ▼9.96
Media Library /wp-admin/upload.php3.24 ▲0.0137.72 ▲3.10

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for GravityForm to Custom Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.241.88 ▼1.5544.19 ▼11.42
Dashboard /wp-admin2,198 ▲185.62 ▼0.0484.38 ▼13.3438.39 ▼4.06
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0438.32 ▲0.8033.20 ▼3.74
Add New Post /wp-admin/post-new.php1,526 ▼221.52 ▼1.58706.95 ▲14.4052.46 ▲1.52
Media Library /wp-admin/upload.php1,403 ▲64.20 ▼0.09102.90 ▼2.0243.41 ▼2.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× 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/gravityform-to-custom-post/on_submit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravityform-to-custom-post/on_submit.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: gravityform, form, post, custom

gravityform-to-custom-post/init.php 92% from 13 tests

Analyzing the main PHP file in "GravityForm to Custom Post" version 0.9
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gravityform-to-custom-post.php" instead of "init.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
Success! There were no dangerous files found in this plugin48 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2171648

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected