68% mediaburst-ecommerce-sms-notifications

Code Review | WP e-Commerce - Clockwork SMS

WordPress plugin WP e-Commerce - Clockwork SMS scored68%from 54 tests.

About plugin

  • Plugin page: mediaburst-ecomme...
  • Plugin version: 2.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8.0
  • WordPress version: 6.3.1
  • First release: Oct 12, 2011
  • Latest release: Jan 5, 2018
  • Number of updates: 104
  • Update frequency: every 21.9 days
  • Top authors: simonwheatley (78.85%)jamesinman (12.5%)mediaburst (7.69%)martinsteel (3.85%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,754 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.92MB] [CPU: ▼50.10ms] Passed 4 tests

Analyzing server-side resources used by WP e-Commerce - Clockwork SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.394.67 ▼35.89
Dashboard /wp-admin2.08 ▼1.227.33 ▼39.63
Posts /wp-admin/edit.php2.09 ▼1.275.89 ▼42.63
Add New Post /wp-admin/post-new.php2.08 ▼3.805.76 ▼82.26
Media Library /wp-admin/upload.php2.08 ▼1.147.92 ▼27.69
Test /wp-admin/admin.php?page=clockwork_test_message2.095.64
Clockwork Options /wp-admin/admin.php?page=clockwork_options2.096.23
WP e-Commerce /wp-admin/admin.php?page=clockwork_wpecommerce2.096.01

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
clockwork_wpecommerce
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP e-Commerce - Clockwork SMS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10214.76 ▲0.391.69 ▼0.5942.79 ▲3.86
Dashboard /wp-admin2,246 ▲615.82 ▼0.04109.79 ▲5.3597.01 ▲50.25
Posts /wp-admin/edit.php2,131 ▲422.00 ▲0.0037.59 ▲0.5833.81 ▲0.85
Add New Post /wp-admin/post-new.php1,701 ▲16722.49 ▼0.56726.04 ▲35.3156.32 ▼13.08
Media Library /wp-admin/upload.php1,425 ▲374.21 ▲0.0095.50 ▼13.5987.36 ▲39.41
Test /wp-admin/admin.php?page=clockwork_test_message8442.1626.2627.16
Clockwork Options /wp-admin/admin.php?page=clockwork_options8791.7122.7528.00
WP e-Commerce /wp-admin/admin.php?page=clockwork_wpecommerce8962.0725.1129.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/mediaburst-ecommerce-sms-notifications/ecommerce-sms-notifications.php+47
    Only variables should be passed by reference
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • clockwork_wpecommerce
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clockwork_wpecommerce
    • > Notice in wp-content/plugins/mediaburst-ecommerce-sms-notifications/ecommerce-sms-notifications.php+47
    Only variables should be passed by reference
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clockwork_wpecommerce
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clockwork_wpecommerce
    • > Warning in wp-content/plugins/mediaburst-ecommerce-sms-notifications/main.php+215
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=clockwork_test_message
    • > Notice in wp-content/plugins/mediaburst-ecommerce-sms-notifications/templates/clockwork-test-message.php+8
    Undefined index: to

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork_Plugin' not found in wp-content/plugins/mediaburst-ecommerce-sms-notifications/main.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mediaburst-ecommerce-sms-notifications/ecommerce-sms-notifications.php:72
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork' not found in wp-content/plugins/mediaburst-ecommerce-sms-notifications/lib/clockwork/class-WordPressClockwork.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

mediaburst-ecommerce-sms-notifications/ecommerce-sms-notifications.php 92% from 13 tests

The primary PHP file in "WP e-Commerce - Clockwork SMS" version 2.4.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("mediaburst-ecommerce-sms-notifications.php" instead of "ecommerce-sms-notifications.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,404 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92947211,356
CSS14025
JavaScript19323

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity34.80
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes00.00%
Methods66
▷ Static methods11.52%
▷ Public methods5278.79%
▷ Protected methods1319.70%
▷ Private methods11.52%
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

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo_16px_16px.png0.43KB0.31KB▼ 27.56%
images/logo_32px_32px.png0.76KB0.45KB▼ 40.95%
images/badrobot.png92.94KB10.20KB▼ 89.03%