84% invitation-code-for-contact-form-7

Code Review | Invitation Code For Contact Form 7

WordPress plugin Invitation Code For Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: invitation-code-f...
  • Plugin version: 1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2021
  • Latest release: Jun 12, 2023
  • Number of updates: 12
  • Update frequency: every 44.8 days
  • Top authors: rajkakadiya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,359 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.77ms] Passed 4 tests

Server-side resources used by Invitation Code For Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.77 ▼5.93
Dashboard /wp-admin3.31 ▲0.0052.89 ▲1.61
Posts /wp-admin/edit.php3.36 ▲0.0049.33 ▲1.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.11 ▼3.14
Media Library /wp-admin/upload.php3.23 ▲0.0035.71 ▼7.31

Server storage [IO: ▲0.15MB] [DB: ▲0.31MB] 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_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Invitation Code For Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.26 ▼1.362.14 ▲0.0147.40 ▲0.97
Dashboard /wp-admin2,206 ▲185.82 ▲0.95115.96 ▼4.5441.76 ▼3.80
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0241.07 ▲2.5732.09 ▼3.91
Add New Post /wp-admin/post-new.php1,514 ▼2017.51 ▼5.40657.13 ▲4.7957.36 ▼0.43
Media Library /wp-admin/upload.php1,388 ▲34.33 ▼0.0393.25 ▼9.6741.95 ▼3.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.31MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though no errors were found, 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invitation-code-for-contact-form-7/functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invitation-code-for-contact-form-7/class-admin.php:6

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: contact form 7, cf7 verification, cf7 subscribers, cf7 invitation code

invitation-code-for-contact-form-7/invitation-code-for-contact-form-7.php Passed 13 tests

The main file in "Invitation Code For Contact Form 7" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
89 characters long description:
Create an invitation code for users with contact form 7 to get the confirmed subscribers.

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
There were no executable files found in this plugin1,711 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS349501,229
PHP44712466
JavaScript21016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity26.00
▷ Minimum class complexity23.00
▷ Maximum class complexity29.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1386.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/calendar.png9.87KB0.84KB▼ 91.51%
assets/images/calendar 1.png6.63KB4.51KB▼ 31.88%