78% contact-form-7-freebie

Code Review | Freebie for Contact Form 7

WordPress plugin Freebie for Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: contact-form-7-fr...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Nov 28, 2022
  • Number of updates: 32
  • Update frequency: every 64.3 days
  • Top authors: munyagu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,602 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.10MB] [CPU: ▼2.05ms] Passed 4 tests

This is a short check of server-side resources used by Freebie for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1039.36 ▼3.71
Dashboard /wp-admin3.45 ▲0.1051.69 ▼4.98
Posts /wp-admin/edit.php3.56 ▲0.1655.48 ▲2.34
Add New Post /wp-admin/post-new.php6.03 ▲0.1098.30 ▼1.83
Media Library /wp-admin/upload.php3.37 ▲0.1044.20 ▲7.38
Freebie for Contact Form 7 /wp-admin/options-general.php?page=cf7freebie_menu3.3435.97

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Freebie for Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.23 ▼0.172.17 ▲0.3839.58 ▼4.29
Dashboard /wp-admin2,199 ▲225.61 ▼0.0391.64 ▲1.3640.94 ▼3.92
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0339.59 ▲0.7037.56 ▼1.65
Add New Post /wp-admin/post-new.php1,529 ▲323.08 ▼0.13614.09 ▼28.7761.73 ▲9.49
Media Library /wp-admin/upload.php1,401 ▲14.19 ▼0.0597.54 ▼12.3647.45 ▲2.41
Freebie for Contact Form 7 /wp-admin/options-general.php?page=cf7freebie_menu8121.9924.6033.07

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cf7freebie_menu
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cf7freebie_menu
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/contact-form-7-freebie/inc/ContactForm7Freebie.php:36

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (setting screen.) image not found
You can take inspiration from this readme.txt

contact-form-7-freebie/contact-form-7-freebie.php Passed 13 tests

The main file in "Freebie for Contact Form 7" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Add a little functionality to the Contact Form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin402 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP312491402

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.00
▷ Minimum class complexity6.00
▷ Maximum class complexity50.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1038.46%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ 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
2 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/google_recaptcha_v3.png3.14KB2.04KB▼ 35.08%
screenshot-1.png15.73KB14.64KB▼ 6.93%