84% contact-form-7-round-robin-lead-distribution

Code Review | Contact Form 7 Round Robin Lead Distribution

WordPress plugin Contact Form 7 Round Robin Lead Distribution scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-7-ro...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Jun 1, 2014
  • Latest release: Dec 2, 2020
  • Number of updates: 26
  • Update frequency: every 92.0 days
  • Top authors: justdave007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,846 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Contact Form 7 Round Robin Lead Distribution
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.90 ▼4.81
Dashboard /wp-admin3.32 ▲0.0246.33 ▼2.72
Posts /wp-admin/edit.php3.37 ▲0.0147.64 ▼0.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.48 ▼1.64
Media Library /wp-admin/upload.php3.25 ▲0.0135.47 ▲4.58

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: 4 new tables, 7 new options
New tables
rr_cf7_sent
rr_cf7_mail
rr_cf7_users
rr_cf7_forms
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
rr_browser_db_version
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 Round Robin Lead Distribution
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.20 ▼1.101.77 ▲0.0240.27 ▼8.55
Dashboard /wp-admin2,213 ▲254.84 ▼1.01107.36 ▼2.7937.81 ▼4.14
Posts /wp-admin/edit.php2,095 ▲62.03 ▲0.0138.25 ▲2.6935.13 ▲3.88
Add New Post /wp-admin/post-new.php1,553 ▲918.40 ▲0.36590.00 ▼61.0465.32 ▲12.93
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0699.68 ▼3.2144.17 ▲1.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-7-round-robin-lead-distribution/admin/includes/mail-sent-list-table.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-round-robin-lead-distribution/includes/rr-process.php:54
    • > 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-round-robin-lead-distribution/admin/includes/mail-sent-list-table.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-round-robin-lead-distribution/admin/rr-admin.php:12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-7-round-robin-lead-distribution/admin/includes/mail-sent-list-table.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/contact-form-7-round-robin-lead-distribution/roundrobin.php:17

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)
No browser errors were detected

Optimizations

Plugin configuration 96% 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
7 plugin tags: lead sharing, enquiry distribution, enquiry sharing, round robin, lead distribution...

contact-form-7-round-robin-lead-distribution/roundrobin.php 92% from 13 tests

"Contact Form 7 Round Robin Lead Distribution" version 1.2.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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-7-round-robin-lead-distribution.php" instead of "roundrobin.php")

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
There were no executable files found in this plugin1,269 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8165137870
JavaScript13131334
CSS1151965

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.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
PNG images were not found in this plugin