84% cf7-referrer-url

Code Review | Referrer Input for Contact Form 7

WordPress plugin Referrer Input for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: cf7-referrer-url
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 5, 2018
  • Latest release: May 20, 2020
  • Number of updates: 11
  • Update frequency: every 68.9 days
  • Top authors: pravinparmar2404 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.14ms] Passed 4 tests

A check of server-side resources used by Referrer Input for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.09 ▼3.05
Dashboard /wp-admin3.33 ▲0.0348.00 ▼1.96
Posts /wp-admin/edit.php3.38 ▲0.0252.70 ▼7.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.40 ▼12.21
Media Library /wp-admin/upload.php3.25 ▲0.0237.94 ▲1.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Referrer Input for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1614.25 ▼0.411.69 ▼0.6039.05 ▼2.45
Dashboard /wp-admin2,211 ▲345.65 ▲0.0494.06 ▼0.9739.03 ▼7.05
Posts /wp-admin/edit.php2,114 ▲112.03 ▲0.0439.96 ▼1.4936.95 ▼4.13
Add New Post /wp-admin/post-new.php1,539 ▲1123.06 ▲0.22678.62 ▲44.0461.72 ▲5.75
Media Library /wp-admin/upload.php1,416 ▲194.18 ▲0.0293.90 ▼24.0044.72 ▼6.97

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-referrer-url/form-tag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-referrer-url/tag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-referrer-url/activation-checks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-referrer-url/activation-checks.php:3

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: referrer input, contact form 7

cf7-referrer-url/functions.php 85% from 13 tests

"Referrer Input for Contact Form 7" 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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cf7-referrer-url.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin113 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44211107
JavaScript2006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screeshot.png18.32KB10.91KB▼ 40.46%