79% smtp-king-pro

Code Review | SMTP King Pro

WordPress plugin SMTP King Pro scored 79% from 54 tests.

About plugin

  • Plugin page: smtp-king-pro
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 5.8.1
  • First release: Nov 4, 2013
  • Latest release: Jan 12, 2014
  • Number of updates: 5
  • Update frequency: every 14.0 days
  • Top authors: ashdurham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,452 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼123.27ms] Passed 4 tests

This is a short check of server-side resources used by SMTP King Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0156.45 ▲14.87
Dashboard /wp-admin3.07 ▲0.0269.03 ▲20.57
Posts /wp-admin/edit.php3.12 ▲0.0253.57 ▲4.74
Add New Post /wp-admin/post-new.php5.43 ▼0.01138.48 ▼512.39
Media Library /wp-admin/upload.php3.02 ▲0.0137.52 ▼0.31
SMTP King Pro /wp-admin/admin.php?page=smtp-king-pro3.0433.09
King Pro Plugins /wp-admin/admin.php?page=kpp_menu3.0438.74

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 190 new files
Database: no new tables, 8 new options
New WordPress options
smtpkp_host
smtpkp_username
smtpkp_password
smtpkp_port
smtpkp_fromname
smtpkp_fromemail
smtpkp_db_version
smtpkp_encryption

Browser metrics Passed 4 tests

SMTP King Pro: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,737 ▲14215.77 ▲0.1218.65 ▲8.9874.95 ▲23.11
Dashboard /wp-admin2,998 ▲705.93 ▼0.15181.25 ▼9.54148.90 ▲29.70
Posts /wp-admin/edit.php2,773 ▲342.72 ▲0.0176.42 ▼4.21102.74 ▼4.26
Add New Post /wp-admin/post-new.php1,705 ▲2218.70 ▲0.38430.21 ▲53.08125.94 ▲18.65
Media Library /wp-admin/upload.php1,841 ▲345.03 ▲0.02171.25 ▲6.91142.71 ▲22.03
SMTP King Pro /wp-admin/admin.php?page=smtp-king-pro1,4152.3869.13118.48
King Pro Plugins /wp-admin/admin.php?page=kpp_menu1,2882.3958.35105.06

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • smtpkp_host
    • smtpkp_fromemail
    • smtpkp_password
    • smtpkp_db_version
    • smtpkp_encryption
    • smtpkp_fromname
    • smtpkp_username
    • smtpkp_port

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=smtp-king-pro
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=smtp-king-pro
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 132× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/smtp-king-pro/includes/screens/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Encoder' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/Mime/HeaderEncoder.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Plugins_Reporter' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/Plugins/Reporters/HitReporter.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Spool' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/MemorySpool.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Swift_Mime_Headers_AbstractHeader' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/Mime/Headers/UnstructuredHeader.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_StreamFilter' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilter.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Swift_Events_EventObject' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/Events/CommandEvent.php:18
    • > PHP Warning
      require(wp-content/plugins/smtp-king-pro/packages/swiftmailer/Swift.php): failed to open stream: No such file or directory in wp-content/plugins/smtp-king-pro/packages/swiftmailer/swift_required_pear.php on line 22
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Signer' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/Signers/BodySigner.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Mime_MimeEntity' not found in wp-content/plugins/smtp-king-pro/packages/swiftmailer/classes/Swift/Mime/Message.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: redirects, simple 301 redirects, 301, bulk upload, csv

smtp-king-pro/smtp-king-pro.php Passed 13 tests

The entry point to "SMTP King Pro" version 1.0.2 is a PHP file that has certain tags in its header comment area
103 characters long description:
Overrides the standard wp_mail function and used SwiftMail via an SMTP connection to send you site mail

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin10,109 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1712,2389,3289,153
CSS2262557
SVG100399

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.54
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces47
Traits0
Classes111
▷ Abstract classes54.50%
▷ Concrete classes10695.50%
▷ Final classes00.00%
Methods1,032
▷ Static methods313.00%
▷ Public methods85582.85%
▷ Protected methods918.82%
▷ Private methods868.33%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants37.89%
▷ Class constants3592.11%
▷ Public constants35100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/kpp-icon_32x32.png2.99KB1.51KB▼ 49.48%
images/kpp-icon_16x16_sat.png1.71KB0.72KB▼ 57.78%
images/kpp-icon_16x16.png1.69KB0.72KB▼ 57.53%
images/kpp-icon_32x32_sat.png3.09KB1.53KB▼ 50.38%