78% transmit-sms-share

Code Review | Transmit SMS Share

WordPress plugin Transmit SMS Share scored78%from 54 tests.

About plugin

  • Plugin page: transmit-sms-share
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2014
  • Latest release: Jan 5, 2016
  • Number of updates: 39
  • Update frequency: every 10.0 days
  • Top authors: adykidd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.23ms] Passed 4 tests

Analyzing server-side resources used by Transmit SMS Share
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.25 ▲2.62
Dashboard /wp-admin3.40 ▲0.0951.05 ▼4.99
Posts /wp-admin/edit.php3.45 ▲0.0950.84 ▼2.15
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.57 ▼9.58
Media Library /wp-admin/upload.php3.32 ▲0.0936.59 ▼4.18
Transmit SMS Share /wp-admin/admin.php?page=transmitSMSSC3.3932.83
Transmit SMS /wp-admin/admin.php?page=transmit-sms3.1326.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Transmit SMS Share
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9713.55 ▼1.191.95 ▲0.2630.70 ▼10.18
Dashboard /wp-admin2,249 ▲525.08 ▼0.81107.08 ▼0.5886.18 ▲38.25
Posts /wp-admin/edit.php2,158 ▲582.24 ▲0.2734.73 ▼6.3238.84 ▲3.35
Add New Post /wp-admin/post-new.php1,713 ▲17322.76 ▼0.38723.33 ▲27.9732.83 ▼20.95
Media Library /wp-admin/upload.php1,434 ▲344.41 ▲0.18103.37 ▼5.4572.45 ▲25.78
Transmit SMS Share /wp-admin/admin.php?page=transmitSMSSC1,2131.8226.1636.00
Transmit SMS /wp-admin/admin.php?page=transmit-sms280.440.093.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant TSC_PLUGIN_DIR - assumed 'TSC_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/transmit-sms-share/admin/admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/transmit-sms-share/transmitsms.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/transmit-sms-share/admin/admin-functions.php:2
    • > PHP Warning
      Use of undefined constant TSC_PLUGIN_DIR - assumed 'TSC_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/transmit-sms-share/settings.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'TSC_PLUGIN_DIR/classTransmitSareCard.php' (include_path='.:/usr/share/php') in wp-content/plugins/transmit-sms-share/settings.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'TSC_PLUGIN_DIR/admin/admin-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/transmit-sms-share/admin/admin.php on line 3
    • > PHP Warning
      require_once(TSC_PLUGIN_DIR/admin/admin-functions.php): failed to open stream: No such file or directory in wp-content/plugins/transmit-sms-share/admin/admin.php on line 3
    • > PHP Warning
      require_once(TSC_PLUGIN_DIR/classTransmitSareCard.php): failed to open stream: No such file or directory in wp-content/plugins/transmit-sms-share/settings.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=transmit-sms
    • > Network (severe)
    wp-admin/admin.php?page=transmit-sms - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

transmit-sms-share/transmitsms.php 92% from 13 tests

"Transmit SMS Share" version 1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("transmit-sms-share.php" instead of "transmitsms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin12,389 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS471,2636,794
JavaScript35081881,312
Sass1323241,256
PHP81463121,252
LESS1323331,247
SVG100520
Markdown1608

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity11.00
▷ Maximum class complexity19.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods3986.67%
▷ Protected methods613.33%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.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
14 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/simple-php-captcha-master/backgrounds/white-wave.png1.25KB0.42KB▼ 66.59%
assets/simple-php-captcha-master/backgrounds/polyester-lite.png1.03KB0.16KB▼ 84.86%
assets/images/trash.png0.49KB0.58KB0.00%
assets/simple-php-captcha-master/backgrounds/kinda-jean.png3.32KB2.51KB▼ 24.22%
assets/images/error.png1.44KB1.43KB0.27%