84% wp-gmail-smtp

Code Review | WP Gmail SMTP

WordPress plugin WP Gmail SMTP scored84%from 54 tests.

About plugin

  • Plugin page: wp-gmail-smtp
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: Aug 21, 2018
  • Number of updates: 45
  • Update frequency: every 15.2 days
  • Top authors: inkthemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /46,434 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.09MB] [CPU: ▼4.77ms] Passed 4 tests

Analyzing server-side resources used by WP Gmail SMTP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.79 ▼0.38
Dashboard /wp-admin3.41 ▲0.0758.04 ▼11.84
Posts /wp-admin/edit.php3.52 ▲0.1755.18 ▲0.65
Add New Post /wp-admin/post-new.php5.99 ▲0.10100.32 ▼4.80
Media Library /wp-admin/upload.php3.33 ▲0.1041.63 ▼2.04

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Gmail SMTP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.35 ▼0.261.76 ▼0.1339.93 ▼1.21
Dashboard /wp-admin2,224 ▲445.59 ▼0.0486.74 ▼6.0339.74 ▼2.34
Posts /wp-admin/edit.php2,127 ▲272.15 ▲0.1640.64 ▲3.2536.72 ▲2.36
Add New Post /wp-admin/post-new.php1,549 ▲2323.46 ▲0.12662.05 ▼28.1049.81 ▼6.27
Media Library /wp-admin/upload.php1,426 ▲264.21 ▲0.02104.13 ▼10.7645.64 ▼3.60

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-gmail-smtp/wp-gmail-smtp.php:38

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 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-gmail-smtp/wp-gmail-smtp.php Passed 13 tests

The entry point to "WP Gmail SMTP" version 1.0.7 is a PHP file that has certain tags in its header comment area
100 characters long description:
WP Gmail SMTP allows you to send all outgoing emails via Gmail SMTP server from your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin545 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP59790545

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.75
▷ Minimum class complexity4.00
▷ Maximum class complexity25.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png93.94KB42.97KB▼ 54.26%
m_bolt_img.png22.17KB8.42KB▼ 62.01%
screenshot-2.png61.45KB26.40KB▼ 57.03%