77% cf7-reply-manager

Code Review | CF7 Reply Manager

WordPress plugin CF7 Reply Manager scored 77% from 54 tests.

About plugin

  • Plugin page: cf7-reply-manager
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 5.8.1
  • First release: May 9, 2019
  • Latest release: Jun 8, 2020
  • Number of updates: 6
  • Update frequency: every 66.0 days
  • Top authors: jadascript (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 393 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.84MB] [CPU: ▼195.37ms] Passed 4 tests

Analyzing server-side resources used by CF7 Reply Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼1.044.86 ▼31.91
Dashboard /wp-admin1.81 ▼1.246.51 ▼46.96
Posts /wp-admin/edit.php1.81 ▼1.295.71 ▼34.71
Add New Post /wp-admin/post-new.php1.81 ▼3.625.67 ▼667.91
Media Library /wp-admin/upload.php1.81 ▼1.196.63 ▼27.65
Settings /wp-admin/admin.php?page=cf7_reply_manager-settings1.815.34
CF7 Reply Manager /wp-admin/admin.php?page=cf7_reply_manager1.815.51

Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/cf7-reply-manager/" and "wp-content/uploads/"
    • (new file) wp-content/cf7-rm-uploads/.empty
Filesystem: 17 new files
Database: 3 new tables, no new options
New tables
wp_cf7rm_vdata
wp_cf7rm_replies
wp_cf7rm_vdata_entry

Browser metrics Passed 4 tests

An overview of browser requirements for CF7 Reply Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,735 ▲16316.06 ▼0.0411.60 ▼1.6244.50 ▼9.43
Dashboard /wp-admin3,014 ▲835.96 ▼0.00132.22 ▼33.66107.07 ▼14.53
Posts /wp-admin/edit.php2,786 ▲472.73 ▲0.0168.84 ▲2.0888.12 ▲0.64
Add New Post /wp-admin/post-new.php1,647 ▲3221.98 ▲0.57284.94 ▲0.06104.62 ▲4.21
Media Library /wp-admin/upload.php1,857 ▲475.06 ▲0.04152.70 ▼10.81116.92 ▲1.24
Settings /wp-admin/admin.php?page=cf7_reply_manager-settings1,2822.4965.3867.80
CF7 Reply Manager /wp-admin/admin.php?page=cf7_reply_manager1,3072.9085.0895.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cf7_rm_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cf7_rm_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cf7_rm_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager
    • > User notice in wp-includes/functions.php+5663
    wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cf7_rm_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cf7_rm_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/form-list.php+11
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/form-list.php+11
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+79
    Undefined property: stdClass::$from_name
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+81
    Undefined property: stdClass::$from_mail
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+83
    Undefined property: stdClass::$reply_to
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+88
    Undefined property: stdClass::$approval_subject
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+90
    Undefined property: stdClass::$approval_message
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+137
    Undefined variable: file_info
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+137
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+118
    Undefined property: stdClass::$rejection_subject
    • > GET request to /wp-admin/admin.php?page=cf7_reply_manager-settings
    • > Notice in wp-content/plugins/cf7-reply-manager/admin/partials/replies.php+120
    Undefined property: stdClass::$rejection_message

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
The following issues need your attention
  • 1× 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-reply-manager/admin/class-cf7-reply-manager-admin.php:5

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 83% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === cf7-reply-manager === )
  • Screenshots: Please a description for screenshot #3 in cf7-reply-manager/assets to your readme.txt
You can take inspiration from this readme.txt

cf7-reply-manager/contact-form-7-reply-manager.php 77% from 13 tests

The entry point to "CF7 Reply Manager" version 1.1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("cf7-reply-manager.php" instead of "contact-form-7-reply-manager.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,092 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7145183530
JavaScript22217291
CSS25414271

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/DataTables-1.10.18/images/sort_asc.png0.16KB0.25KB0.00%
admin/css/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%
admin/css/DataTables-1.10.18/images/sort_desc_disabled.png0.14KB0.25KB0.00%
admin/css/DataTables-1.10.18/images/sort_asc_disabled.png0.14KB0.25KB0.00%
admin/css/DataTables-1.10.18/images/sort_desc.png0.15KB0.25KB0.00%