84% turbosmtp

Code Review | turboSMTP

WordPress plugin turboSMTP scored84%from 54 tests.

About plugin

  • Plugin page: turbosmtp
  • Plugin version: 3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 14, 2014
  • Latest release: Aug 22, 2023
  • Number of updates: 79
  • Update frequency: every 42.1 days
  • Top authors: dueclic (73.42%)aleflocco (27.85%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /8,734 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.89ms] Passed 4 tests

A check of server-side resources used by turboSMTP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.80 ▼4.77
Dashboard /wp-admin3.46 ▲0.1651.40 ▼2.92
Posts /wp-admin/edit.php3.58 ▲0.2246.21 ▼4.45
Add New Post /wp-admin/post-new.php6.05 ▲0.1688.77 ▼3.43
Media Library /wp-admin/upload.php3.39 ▲0.1647.76 ▲12.89

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
ts_send_options
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by turboSMTP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.31 ▼1.061.80 ▼0.1238.80 ▼8.20
Dashboard /wp-admin2,220 ▲325.82 ▼0.06103.74 ▼13.0371.00 ▲26.24
Posts /wp-admin/edit.php2,105 ▲162.31 ▲0.3134.12 ▼5.6533.98 ▼3.32
Add New Post /wp-admin/post-new.php1,524 ▲1023.08 ▲5.57692.53 ▼60.5652.39 ▼14.18
Media Library /wp-admin/upload.php1,398 ▲74.41 ▲0.24123.31 ▲23.1072.09 ▲25.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/turbosmtp/class/TSAjaxListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function turbosmtp_validapi() in wp-content/plugins/turbosmtp/turbo-logout-section.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'TurboApiClient' not found in wp-content/plugins/turbosmtp/class/TurboApiStats.php:143
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/turbosmtp/class/TSAjaxListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/turbosmtp/turbo-smtp-plugin.php:15
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/turbosmtp/class/TSAjaxListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/turbosmtp/turbo-stats-section.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function turbosmtp_validapi() in wp-content/plugins/turbosmtp/turbo-config-section.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: mailer, phpmailer, email, mail, turbo smtp...

turbosmtp/turbo-smtp-plugin.php 92% from 13 tests

The main PHP file in "turboSMTP" ver. 3.9 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("turbosmtp.php" instead of "turbo-smtp-plugin.php")

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
There were no executable files found in this plugin11,577 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,198
JavaScript54061381,490
PHP9438421,246
Sass1419720
PO File2189195453
CSS3732339
Markdown21100131

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.80
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods2090.91%
▷ Protected methods14.55%
▷ Private methods14.55%
Functions38
▷ Named functions2463.16%
▷ Anonymous functions1436.84%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
22 PNG files occupy 0.59MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/yellow_dot.png49.08KB0.25KB▼ 99.48%
img/icon-arrow-down.png14.98KB0.36KB▼ 97.62%
img/icon-stat.png15.91KB1.05KB▼ 93.41%
img/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
img/icon-arrow-left.png14.94KB0.28KB▼ 98.10%