84% smtp-locaweb

Code Review | SMTP Locaweb for Wordpress

WordPress plugin SMTP Locaweb for Wordpress scored84%from 54 tests.

About plugin

  • Plugin page: smtp-locaweb
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.4
  • WordPress version: 6.3.1
  • First release: Aug 18, 2015
  • Latest release: Sep 21, 2015
  • Number of updates: 20
  • Update frequency: every 2.0 days
  • Top authors: fabioperrella (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,012 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.16ms] Passed 4 tests

A check of server-side resources used by SMTP Locaweb for Wordpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.25 ▲1.73
Dashboard /wp-admin3.37 ▲0.0246.58 ▼11.15
Posts /wp-admin/edit.php3.49 ▲0.1352.88 ▲4.97
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.42 ▼14.77
Media Library /wp-admin/upload.php3.29 ▲0.0635.51 ▼0.46
SmtpLocaweb /wp-admin/options-general.php?page=smtp_locaweb3.2732.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SMTP Locaweb for Wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.21 ▼1.181.53 ▼0.1739.69 ▼1.07
Dashboard /wp-admin2,216 ▲254.89 ▼1.02108.37 ▲5.0243.61 ▲2.92
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0239.36 ▲4.9035.68 ▲2.99
Add New Post /wp-admin/post-new.php1,544 ▲2023.25 ▲0.05578.54 ▼56.1549.81 ▼3.77
Media Library /wp-admin/upload.php1,398 ▲104.23 ▲0.0293.94 ▼10.3243.50 ▼1.80
SmtpLocaweb /wp-admin/options-general.php?page=smtp_locaweb9322.2225.2224.18

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • smtp_locaweb
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smtp-locaweb/includes/options-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/smtp-locaweb/smtp_locaweb.php:95
    • > PHP Fatal error
      Uncaught Error: Class 'SmtpLocaweb' not found in wp-content/plugins/smtp-locaweb/includes/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: locaweb, email, mail, smtp

smtp-locaweb/smtp_locaweb.php 85% from 13 tests

The principal PHP file in "SMTP Locaweb for Wordpress" v. 0.1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smtp-locaweb.php" instead of "smtp_locaweb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected278 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP333125278

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.50
▷ Minimum class complexity14.00
▷ Maximum class complexity17.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.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
1 PNG file occupies 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png117.06KB44.18KB▼ 62.26%