84% referrer-input-for-contact-form-7

Code Review | Referrer Input for Contact Form 7

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

About plugin

  • Plugin page: referrer-input-fo...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.4.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 21, 2016
  • Latest release: Jan 11, 2017
  • Number of updates: 6
  • Update frequency: every 20.2 days
  • Top authors: damiarita (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active / 3,109 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Referrer Input for Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0332.91 ▼7.30
Dashboard /wp-admin3.33 ▲0.0343.16 ▼7.37
Posts /wp-admin/edit.php3.38 ▲0.0245.35 ▲0.66
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.18 ▼6.19
Media Library /wp-admin/upload.php3.26 ▲0.0234.58 ▲2.66

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

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

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,813 ▲5613.27 ▼1.131.64 ▼0.8339.03 ▼8.30
Dashboard /wp-admin2,219 ▲285.90 ▼0.01116.74 ▲2.6243.56 ▲1.39
Posts /wp-admin/edit.php2,102 ▲102.05 ▼0.0039.80 ▼1.5937.24 ▲1.73
Add New Post /wp-admin/post-new.php1,551 ▲1423.22 ▲4.74668.61 ▲13.6060.80 ▲3.86
Media Library /wp-admin/upload.php1,401 ▲104.23 ▲0.02122.84 ▲16.1351.00 ▲4.18

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 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/referrer-input-for-contact-form-7/tag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/referrer-input-for-contact-form-7/activation-checks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/referrer-input-for-contact-form-7/form-tag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/referrer-input-for-contact-form-7/activation-checks.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: contact form 7, javascript, css, jquery, referrer

referrer-input-for-contact-form-7/functions.php 85% from 13 tests

The main PHP script in "Referrer Input for Contact Form 7" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 163 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("referrer-input-for-contact-form-7.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin113 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44211107
JavaScript2006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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
There were not PNG files found in your plugin