83% contact-form-7-lead-info-with-country

Code Review | Lead info with country for Contact Form 7

WordPress plugin Lead info with country for Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: contact-form-7-le...
  • Plugin version: 2.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 13, 2014
  • Latest release: Sep 23, 2023
  • Number of updates: 102
  • Update frequency: every 31.4 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /56,688 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Lead info with country for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.50 ▼4.71
Dashboard /wp-admin3.34 ▲0.0346.21 ▼5.45
Posts /wp-admin/edit.php3.39 ▲0.0349.64 ▲3.27
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.86 ▼8.59
Media Library /wp-admin/upload.php3.26 ▲0.0335.15 ▼2.49

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Lead info with country for Contact Form 7: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.64 ▼0.0639.42 ▼2.50
Dashboard /wp-admin2,195 ▲215.55 ▼0.0684.10 ▼13.6939.66 ▼3.37
Posts /wp-admin/edit.php2,100 ▼02.11 ▲0.1039.59 ▲4.3334.87 ▼0.01
Add New Post /wp-admin/post-new.php1,531 ▲323.38 ▲0.35662.57 ▼84.0753.27 ▼9.45
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.1096.21 ▼7.3640.57 ▼4.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-7-lead-info-with-country/wpshore_cf7_lead_tracking.php on line 19
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-7-lead-info-with-country/wpshore_cf7_lead_tracking.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-7-lead-info-with-country/wpshore_cf7_lead_tracking.php on line 19

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)
There were no browser issues found

Optimizations

Plugin configuration 86% 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
These attributes need to be fixed: The official readme.txt is a good inspiration

contact-form-7-lead-info-with-country/wpshore_cf7_lead_tracking.php 77% from 13 tests

This is the main PHP file of "Lead info with country for Contact Form 7" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 501 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-7-lead-info-with-country.php" instead of "wpshore_cf7_lead_tracking.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected162 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11224101
PO File1121561

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions3
▷ Named functions3100.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 files were detected