78% formidable-sms

Code Review | Formidable - Clockwork SMS

WordPress plugin Formidable - Clockwork SMS scored 78% from 54 tests.

About plugin

  • Plugin page: formidable-sms
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.0.0
  • WordPress version: 6.3.1
  • First release: Oct 3, 2012
  • Latest release: Jan 5, 2018
  • Number of updates: 14
  • Update frequency: every 137.4 days
  • Top authors: mediaburst (50%)jamesinman (42.86%)martinsteel (21.43%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,064 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.63ms] Passed 4 tests

This is a short check of server-side resources used by Formidable - Clockwork SMS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0254.91 ▲16.65
Dashboard /wp-admin3.35 ▲0.0450.55 ▲2.38
Posts /wp-admin/edit.php3.46 ▲0.1048.90 ▲0.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.64 ▼4.66
Media Library /wp-admin/upload.php3.27 ▲0.0438.99 ▲3.99
Test /wp-admin/admin.php?page=clockwork_test_message3.2731.35
Formidable /wp-admin/admin.php?page=clockwork_formidable3.2730.93
Clockwork Options /wp-admin/admin.php?page=clockwork_options3.2631.68

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Formidable - Clockwork SMS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11813.18 ▼1.202.66 ▲0.4653.34 ▲10.99
Dashboard /wp-admin2,249 ▲616.00 ▲0.18132.17 ▲29.4544.94 ▼0.15
Posts /wp-admin/edit.php2,140 ▲482.02 ▲0.0539.67 ▼6.2041.52 ▲4.99
Add New Post /wp-admin/post-new.php1,405 ▼13920.70 ▲2.50501.09 ▼118.11112.89 ▲47.96
Media Library /wp-admin/upload.php1,437 ▲494.18 ▼0.0298.69 ▼1.6441.65 ▼4.02
Test /wp-admin/admin.php?page=clockwork_test_message8562.1925.6136.29
Formidable /wp-admin/admin.php?page=clockwork_formidable8982.0426.6234.05
Clockwork Options /wp-admin/admin.php?page=clockwork_options8911.6825.6434.77

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=clockwork_test_message
    • > Notice in wp-content/plugins/formidable-sms/templates/clockwork-test-message.php+8
    Undefined index: to
    • > GET request to /wp-admin/admin.php?page=clockwork_formidable
    • > Notice in wp-content/plugins/formidable-sms/main.php+92
    Trying to access array offset on value of type bool

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/formidable-sms/formidable-sms.php:76
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork' not found in wp-content/plugins/formidable-sms/lib/clockwork/class-WordPressClockwork.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork_Plugin' not found in wp-content/plugins/formidable-sms/main.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (SMS settings in detail) image not found
The official readme.txt is a good inspiration

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

The main PHP script in "Formidable - Clockwork SMS" version 1.1.3 is automatically included on every request by 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,242 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92525951,194
CSS14025
JavaScript19323

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity27.60
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods3774.00%
▷ Protected methods1224.00%
▷ Private methods12.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ 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.14MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo_32px_32px.png0.76KB0.45KB▼ 40.95%
images/badrobot.png92.94KB10.20KB▼ 89.03%
images/logo_16px_16px.png0.43KB0.31KB▼ 27.56%
screenshot-1.png47.38KB14.69KB▼ 68.99%