90% regex-textfield-gravityforms-add-on

Code Review | Regex Textfield: Gravityforms Add-on

WordPress plugin Regex Textfield: Gravityforms Add-on scored90%from 54 tests.

About plugin

  • Plugin page: regex-textfield-g...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2022
  • Latest release: Nov 10, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: peshmerge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /232 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
Installer ran successfully

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

Server-side resources used by Regex Textfield: Gravityforms Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.13 ▼2.83
Dashboard /wp-admin3.31 ▲0.0143.52 ▼2.89
Posts /wp-admin/edit.php3.37 ▲0.0146.01 ▲1.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.84 ▼6.85
Media Library /wp-admin/upload.php3.24 ▲0.0033.78 ▼3.00

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Regex Textfield: Gravityforms Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.70 ▼0.681.60 ▼0.3438.41 ▼12.79
Dashboard /wp-admin2,209 ▲245.89 ▲0.0497.38 ▼17.8139.51 ▼7.77
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0139.41 ▲4.0934.73 ▼1.66
Add New Post /wp-admin/post-new.php1,519 ▼1423.13 ▼0.10651.77 ▼27.7856.42 ▼2.07
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.07101.44 ▼12.0646.04 ▼0.38

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • 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 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
2 plugin tags: gravityforms, gravity form

regex-textfield-gravityforms-add-on/class-gf-regex-textfield-bootstrap.php 92% from 13 tests

The entry point to "Regex Textfield: Gravityforms Add-on" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("regex-textfield-gravityforms-add-on.php" instead of "class-gf-regex-textfield-bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin248 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32971213
SVG11035

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.33
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected