90% invitation-codes-gravityforms-add-on

Code Review | Invitation Codes: Gravityforms Add-on

WordPress plugin Invitation Codes: Gravityforms Add-on scored90%from 54 tests.

About plugin

  • Plugin page: invitation-codes-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Apr 9, 2023
  • Number of updates: 6
  • Update frequency: every 31.2 days
  • Top authors: peshmerge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /317 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: ▼2.03ms] Passed 4 tests

This is a short check of server-side resources used by Invitation Codes: Gravityforms Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.45 ▲0.72
Dashboard /wp-admin3.31 ▲0.0147.81 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0144.97 ▲0.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.19 ▼3.41
Media Library /wp-admin/upload.php3.23 ▲0.0133.89 ▼2.08

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: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Invitation Codes: Gravityforms Add-on
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.47 ▼0.931.95 ▲0.0640.93 ▼2.20
Dashboard /wp-admin2,206 ▲186.00 ▲1.09100.63 ▼16.4838.99 ▼3.79
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0039.33 ▲3.0134.86 ▼0.13
Add New Post /wp-admin/post-new.php1,514 ▼717.65 ▼5.68688.75 ▲60.7450.26 ▼5.57
Media Library /wp-admin/upload.php1,388 ▲64.21 ▼0.0293.93 ▼2.9442.54 ▼0.03

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: invitation codes, gravity form, gravityforms

invitation-codes-gravityforms-add-on/class-gf-invitation-code-bootstrap.php 92% from 13 tests

"Invitation Codes: Gravityforms Add-on" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("invitation-codes-gravityforms-add-on.php" instead of "class-gf-invitation-code-bootstrap.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
No dangerous file extensions were detected392 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32984217
SVG100175

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.33
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.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

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