74% twd-smtp-mail

Code Review | TWD SMTP Mail

WordPress plugin TWD SMTP Mail scored74%from 54 tests.

About plugin

  • Plugin page: twd-smtp-mail
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.8.2
  • WordPress version: 6.3.1
  • First release: Apr 12, 2014
  • Latest release: Apr 15, 2014
  • Number of updates: 10
  • Update frequency: every 137.2 days
  • Top authors: jaydp (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /1,543 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
Install script ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼34.00ms] Passed 4 tests

Server-side resources used by TWD SMTP Mail
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0258.59 ▲15.49
Dashboard /wp-admin3.05 ▼0.2526.01 ▼28.43
Posts /wp-admin/edit.php3.05 ▼0.3030.74 ▼21.76
Add New Post /wp-admin/post-new.php3.05 ▼2.8327.37 ▼76.58
Media Library /wp-admin/upload.php3.05 ▼0.1729.35 ▼9.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TWD SMTP Mail
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.69 ▼0.872.75 ▲0.7451.15 ▲7.15
Dashboard /wp-admin2,225 ▲464.88 ▲0.00108.74 ▼3.3542.08 ▼2.20
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0140.49 ▲0.0934.94 ▼2.09
Add New Post /wp-admin/post-new.php1,526 ▼1817.41 ▼1.11687.62 ▲18.1571.25 ▲3.75
Media Library /wp-admin/upload.php1,401 ▲164.22 ▼0.01103.39 ▼2.9644.83 ▼3.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'TWD_SMTP_PLUGIN_DIR/view_smtp_form.php' (include_path='.:/usr/share/php') in wp-content/plugins/twd-smtp-mail/class.smtp_admin.php on line 3
    • > PHP Warning
      Use of undefined constant TWD_SMTP_PLUGIN_DIR - assumed 'TWD_SMTP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/twd-smtp-mail/class.smtp_admin.php on line 3
    • > PHP Warning
      require_once(TWD_SMTP_PLUGIN_DIR/view_smtp_form.php): failed to open stream: No such file or directory in wp-content/plugins/twd-smtp-mail/class.smtp_admin.php on line 3

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Plugin Configure.) image missing
Please take inspiration from this readme.txt

twd-smtp-mail/twd-smtp-mail.php Passed 13 tests

"TWD SMTP Mail" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
64 characters long description:
You can send email via SMTP Mail Server from your WordPress Blog

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
No dangerous file extensions were detected389 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46221389

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.50
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png70.73KB39.30KB▼ 44.43%