89% wpcasa-gravity-forms

Code Review | WPCasa Gravity Forms

WordPress plugin WPCasa Gravity Forms scored89%from 54 tests.

About plugin

  • Plugin page: wpcasa-gravity-forms
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 25, 2016
  • Latest release: Jul 14, 2021
  • Number of updates: 14
  • Update frequency: every 136.3 days
  • Top authors: wpSight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,830 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.28ms] Passed 4 tests

Server-side resources used by WPCasa Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.68 ▼2.56
Dashboard /wp-admin3.33 ▲0.0347.23 ▼0.49
Posts /wp-admin/edit.php3.38 ▲0.0347.23 ▼3.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.66 ▼1.88
Media Library /wp-admin/upload.php3.25 ▲0.0332.82 ▼1.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WPCasa Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.184.38 ▲2.7738.24 ▼2.87
Dashboard /wp-admin2,206 ▲185.90 ▲0.04106.40 ▼18.7144.43 ▲1.06
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0440.56 ▲0.4134.55 ▼0.89
Add New Post /wp-admin/post-new.php1,520 ▼1323.34 ▲0.36618.22 ▲5.4360.02 ▲6.29
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.0894.11 ▼4.7041.72 ▼0.81

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wpcasa-gravity-forms/wpcasa-gravityforms.php 85% from 13 tests

"WPCasa Gravity Forms" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpcasa-gravity-forms.php" instead of "wpcasa-gravityforms.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected358 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP289201170
PO File24040142
CSS27045
JSON1001

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.40
Average class complexity12.00
▷ Minimum class complexity4.00
▷ Maximum class complexity20.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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