84% gravity-forms-update-post

Code Review | Gravity Forms - Update Post

WordPress plugin Gravity Forms - Update Post scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-upd...
  • Plugin version: 0.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.3.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2012
  • Latest release: May 28, 2012
  • Number of updates: 7
  • Update frequency: every 21.1 days
  • Top authors: p51labs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.10ms] Passed 4 tests

A check of server-side resources used by Gravity Forms - Update Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0748.11 ▲2.59
Dashboard /wp-admin3.37 ▲0.0755.49 ▼3.78
Posts /wp-admin/edit.php3.48 ▲0.1354.63 ▼3.71
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.42 ▼20.69
Media Library /wp-admin/upload.php3.29 ▲0.0736.76 ▼4.21

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Gravity Forms - Update Post: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2813.91 ▼0.451.94 ▲0.1345.46 ▼3.23
Dashboard /wp-admin2,192 ▲155.64 ▼0.0395.86 ▼1.7546.08 ▲3.04
Posts /wp-admin/edit.php2,100 ▼31.95 ▲0.0036.59 ▼1.7636.53 ▲2.10
Add New Post /wp-admin/post-new.php1,526 ▼523.42 ▲0.47712.61 ▲7.5664.81 ▲12.66
Media Library /wp-admin/upload.php1,397 ▼34.14 ▼0.05101.19 ▼21.2445.01 ▼3.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

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/gravity-forms-update-post/gravityforms-update-post.php:58

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: forms, update, gravityforms, edit

gravity-forms-update-post/gravityforms-update-post.php 92% from 13 tests

This is the main PHP file of "Gravity Forms - Update Post" version 0.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gravity-forms-update-post.php" instead of "gravityforms-update-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected333 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110325333

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.74
Average class complexity71.00
▷ Minimum class complexity71.00
▷ Maximum class complexity71.00
Average method complexity4.89
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin