68% fscf-sms

Code Review | Fast Secure Contact Form - Clockwork SMS

WordPress plugin Fast Secure Contact Form - Clockwork SMS scored68%from 54 tests.

About plugin

  • Plugin page: fscf-sms
  • Plugin version: 2.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.0.0
  • WordPress version: 6.3.1
  • First release: Mar 6, 2012
  • Latest release: Jan 5, 2018
  • Number of updates: 34
  • Update frequency: every 62.9 days
  • Top authors: jamesinman (44.12%)martinsteel (38.24%)mediaburst (23.53%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /12,060 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.61MB] [CPU: ▼51.30ms] Passed 4 tests

Server-side resources used by Fast Secure Contact Form - Clockwork SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.38 ▼1.095.94 ▼37.15
Dashboard /wp-admin2.40 ▼0.917.76 ▼39.51
Posts /wp-admin/edit.php2.40 ▼0.967.99 ▼38.51
Add New Post /wp-admin/post-new.php2.40 ▼3.497.77 ▼90.03
Media Library /wp-admin/upload.php2.40 ▼0.837.59 ▼23.80
Clockwork Options /wp-admin/admin.php?page=clockwork_options2.407.20
FS Contact Form /wp-admin/admin.php?page=fscf2.408.23
Test /wp-admin/admin.php?page=clockwork_test_message2.406.30

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Fast Secure Contact Form - Clockwork SMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.29 ▼1.101.56 ▼0.2141.54 ▼2.21
Dashboard /wp-admin2,246 ▲554.90 ▲0.0299.16 ▼3.1588.02 ▲46.59
Posts /wp-admin/edit.php2,128 ▲392.02 ▲0.0534.74 ▼3.9734.06 ▼0.96
Add New Post /wp-admin/post-new.php1,553 ▲1423.06 ▼0.22784.99 ▲155.7557.10 ▼5.97
Media Library /wp-admin/upload.php1,419 ▲374.28 ▲0.02100.69 ▲0.4572.92 ▲30.00
Clockwork Options /wp-admin/admin.php?page=clockwork_options8821.6826.2428.05
FS Contact Form /wp-admin/admin.php?page=fscf8242.0728.7228.00
Test /wp-admin/admin.php?page=clockwork_test_message8442.1924.3424.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/fscf-sms/fscf-sms.php+48
    Only variables should be passed by reference
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clockwork_test_message
    • > Notice in wp-content/plugins/fscf-sms/fscf-sms.php+48
    Only variables should be passed by reference
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clockwork_test_message
    • > Warning in wp-content/plugins/fscf-sms/main.php+156
    Use of undefined constant FSCF_PLUGIN_DIR - assumed 'FSCF_PLUGIN_DIR' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=clockwork_test_message
    • > Notice in wp-content/plugins/fscf-sms/templates/clockwork-test-message.php+8
    Undefined index: to

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 take a closer look at the following
  • 3× 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/fscf-sms/fscf-sms.php:73
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork_Plugin' not found in wp-content/plugins/fscf-sms/main.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork' not found in wp-content/plugins/fscf-sms/lib/clockwork/class-WordPressClockwork.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Clockwork settings)
You can look at the official readme.txt

fscf-sms/fscf-sms.php Passed 13 tests

"Fast Secure Contact Form - Clockwork SMS" version 2.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
62 characters long description:
Send SMS notifications when somebody submits your contact form

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,192 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92335741,144
CSS14025
JavaScript19323

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity29.20
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes00.00%
Methods47
▷ Static methods12.13%
▷ Public methods3778.72%
▷ Protected methods919.15%
▷ Private methods12.13%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants17.14%
▷ Class constants1392.86%
▷ Public constants13100.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
4 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.13KB11.65KB▼ 66.84%
images/badrobot.png92.94KB10.20KB▼ 89.03%
images/logo_32px_32px.png0.76KB0.45KB▼ 40.95%
images/logo_16px_16px.png0.43KB0.31KB▼ 27.56%