72% r-s-contact-form

Code Review | R S Contact Form - Compose, Receive, Reply, Draft, Trash, Delete

WordPress plugin R S Contact Form - Compose, Receive, Reply, Draft, Trash, Delete scored72%from 54 tests.

About plugin

  • Plugin page: r-s-contact-form
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Jun 3, 2021
  • Number of updates: 20
  • Update frequency: every 20.6 days
  • Top authors: rsrussell (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.58MB] [CPU: ▲0.44ms] Passed 4 tests

An overview of server-side resources used by R S Contact Form - Compose, Receive, Reply, Draft, Trash, Delete
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5940.89 ▲0.16
Dashboard /wp-admin3.93 ▲0.6249.41 ▼0.09
Posts /wp-admin/edit.php3.98 ▲0.6254.46 ▲5.57
Add New Post /wp-admin/post-new.php6.44 ▲0.5699.11 ▼3.88
Media Library /wp-admin/upload.php3.79 ▲0.5640.29 ▲7.89
/wp-admin/admin.php?page=rscf-spam3.7838.00
/wp-admin/admin.php?page=rscf-draft3.7839.68
/wp-admin/admin.php?page=rscf-sent3.7836.56
Messages /wp-admin/admin.php?page=rscf3.7834.92
/wp-admin/admin.php?page=rscf-trash3.7837.45
/wp-admin/admin.php?page=rscf-details3.7738.13
Settings /wp-admin/admin.php?page=rscf-settings3.7732.94
/wp-admin/admin.php?page=rscf-reply3.8139.66

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 89 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
russell_smtp
widget_recent-comments
rscf
theysaidso_admin_options
russell_message
russell_process
can_compress_scripts
...

Browser metrics Passed 4 tests

R S Contact Form - Compose, Receive, Reply, Draft, Trash, Delete: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲11913.55 ▼1.062.07 ▼0.1039.33 ▼10.63
Dashboard /wp-admin2,250 ▲625.87 ▼0.04106.15 ▼10.9039.37 ▼9.29
Posts /wp-admin/edit.php2,133 ▲442.05 ▲0.0339.37 ▲5.4537.35 ▲2.22
Add New Post /wp-admin/post-new.php1,567 ▲3423.05 ▼0.17633.57 ▼45.4048.48 ▼17.95
Media Library /wp-admin/upload.php1,435 ▲504.17 ▼0.0494.90 ▼7.4241.11 ▼1.32
/wp-admin/admin.php?page=rscf-spam1,1876.95202.3783.94
/wp-admin/admin.php?page=rscf-draft1,1786.98184.5036.09
/wp-admin/admin.php?page=rscf-sent1,1846.90103.1736.15
Messages /wp-admin/admin.php?page=rscf1,1926.90107.6941.17
/wp-admin/admin.php?page=rscf-trash1,1896.91105.5435.04
/wp-admin/admin.php?page=rscf-details1,0816.5692.5351.58
Settings /wp-admin/admin.php?page=rscf-settings1,5656.4690.0350.36
/wp-admin/admin.php?page=rscf-reply1,1176.4989.1940.52

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rscf-reply
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/message_reply.php+51
    Undefined index: msg_status
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rscf-reply
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/message_reply.php+63
    Undefined index: email
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rscf-details
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/include/inbox_details.php+36
    Undefined index: msg_id
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rscf-reply
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/message_reply.php+67
    Undefined index: subject
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rscf-reply
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/message_reply.php+79
    Undefined index: sender_name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rscf-reply
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/message_reply.php+69
    Undefined index: msg_date
    • > GET request to /wp-admin/admin.php?page=rscf-details
    • > Notice in wp-content/plugins/r-s-contact-form/views/admin/include/inbox_details.php+30
    Undefined index: message

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/r-s-contact-form/message.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_trash_view.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_view.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_reply.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_details.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\MessageBaseController' not found in wp-content/plugins/r-s-contact-form/inc/Base/MessageController.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\MessageBaseController' not found in wp-content/plugins/r-s-contact-form/inc/Pages/MessageDashboard.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_sent_view.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/include/inbox_details.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_spam_view.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/r-s-contact-form/views/admin/message_draft_view.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7 in r-s-contact-form/assets to your readme.txt
The official readme.txt might help

r-s-contact-form/message.php 85% from 13 tests

The main file in "R S Contact Form - Compose, Receive, Reply, Draft, Trash, Delete" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("r-s-contact-form.php" instead of "message.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin10,675 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP393582873,243
CSS8558273,078
SVG2002,959
JavaScript877881,231
JSON310150
Sass12014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity20.74
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods83
▷ Static methods89.64%
▷ Public methods7893.98%
▷ Protected methods00.00%
▷ Private methods56.02%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants16
▷ Global constants16100.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
6 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/contact_from_01.png38.93KB12.93KB▼ 66.80%
assets/images/close_icon.png1.66KB0.69KB▼ 58.55%
assets/images/success.png7.46KB3.02KB▼ 59.60%
assets/images/thanku.png6.13KB3.11KB▼ 49.23%
assets/images/contact_from_02.png21.45KB7.39KB▼ 65.56%