10% phpsword-smtp-email-setup

Code Review | PhpSword SMTP Email Setup

WordPress plugin PhpSword SMTP Email Setup scored10%from 54 tests.

About plugin

  • Plugin page: phpsword-smtp-ema...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2014
  • Latest release: Jul 31, 2022
  • Number of updates: 3
  • Update frequency: every 932.0 days
  • Top authors: phpsword (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,173 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/phpsword-smtp-email-setup/index.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; PhpswSES has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼52.16ms] Passed 4 tests

This is a short check of server-side resources used by PhpSword SMTP Email Setup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.309.25 ▼30.28
Dashboard /wp-admin2.18 ▼1.135.91 ▼43.96
Posts /wp-admin/edit.php2.18 ▼1.187.08 ▼42.72
Add New Post /wp-admin/post-new.php2.18 ▼3.715.77 ▼91.67
Media Library /wp-admin/upload.php2.18 ▼1.055.56 ▼28.36

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
PhpswSESOptions
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for PhpSword SMTP Email Setup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.27 ▼1.311.82 ▲0.1337.26 ▼7.13
Dashboard /wp-admin2,225 ▲345.90 ▲0.9693.94 ▼9.6139.22 ▼1.70
Posts /wp-admin/edit.php2,105 ▲372.01 ▼0.0534.49 ▲0.3034.31 ▲2.60
Add New Post /wp-admin/post-new.php1,533 ▲1923.50 ▲5.86610.79 ▼82.7449.98 ▼1.23
Media Library /wp-admin/upload.php1,404 ▲164.23 ▲0.0993.02 ▼15.3240.03 ▼7.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/phpsword-smtp-email-setup/index.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; PhpswSES has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • PhpswSESOptions
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/phpsword-smtp-email-setup/index.php:275

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (PhpSword SMTP Email Setup Screenshot1) image required
Please take inspiration from this readme.txt

phpsword-smtp-email-setup/index.php 85% from 13 tests

Analyzing the main PHP file in "PhpSword SMTP Email Setup" version 1.0
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("phpsword-smtp-email-setup.php" instead of "index.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
Success! There were no dangerous files found in this plugin216 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14727216

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/phpswses.png1.06KB0.22KB▼ 79.52%