83% contact-form-7-referrer-addon

Code Review | Contact Form 7 Referrer Addon Plugin

WordPress plugin Contact Form 7 Referrer Addon Plugin scored 83% from 54 tests.

About plugin

  • Plugin page: contact-form-7-re...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 10, 2014
  • Latest release: Dec 10, 2014
  • Number of updates: 2
  • Update frequency: every 9.0 days
  • Top authors: nicholas_tsim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,857 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.84ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 Referrer Addon Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.33 ▲1.22
Dashboard /wp-admin3.33 ▲0.0345.06 ▼4.37
Posts /wp-admin/edit.php3.38 ▲0.0349.25 ▲2.91
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.57 ▼11.46
Media Library /wp-admin/upload.php3.26 ▲0.0335.30 ▼0.76

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Contact Form 7 Referrer Addon Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.074.03 ▲2.2436.92 ▼6.30
Dashboard /wp-admin2,206 ▲154.88 ▼0.03113.17 ▲12.4539.05 ▼8.63
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0339.41 ▼2.6634.97 ▼3.28
Add New Post /wp-admin/post-new.php1,537 ▲2323.03 ▲5.42670.32 ▼0.1656.30 ▲1.49
Media Library /wp-admin/upload.php1,385 ▼34.12 ▼0.0498.15 ▼10.2945.30 ▼0.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-referrer-addon/referrer.php:47

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

readme.txt 88% 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:
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
You can take inspiration from this readme.txt

contact-form-7-referrer-addon/referrer.php 85% from 13 tests

This is the main PHP file of "Contact Form 7 Referrer Addon Plugin" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-form-7-referrer-addon.php" instead of "referrer.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin110 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13714110

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin