84% mail-integration-365

Code Review | WPO365 | Mail Integration for Office 365 / Outlook

WordPress plugin WPO365 | Mail Integration for Office 365 / Outlook scored84%from 54 tests.

About plugin

  • Plugin page: mail-integration-365
  • Plugin version: 1.9.1
  • PHP compatiblity: 7.1.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-6.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: May 3, 2023
  • Number of updates: 98
  • Update frequency: every 9.0 days
  • Top authors: edwardcross (95.92%)wpo365 (6.12%)

Code review

54 tests

User reviews

26 reviews

Install metrics

4,000+ active /44,396 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▼0.58ms] Passed 4 tests

Server-side resources used by WPO365 | Mail Integration for Office 365 / Outlook
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2644.58 ▲2.78
Dashboard /wp-admin3.63 ▲0.3350.13 ▼5.19
Posts /wp-admin/edit.php3.69 ▲0.3352.34 ▲5.83
Add New Post /wp-admin/post-new.php6.15 ▲0.2790.48 ▼5.74
Media Library /wp-admin/upload.php3.50 ▲0.2739.73 ▲6.11
Mail Integration 365 Settings /wp-admin/options-general.php?page=mail-integration-365-settings3.4936.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WPO365 | Mail Integration for Office 365 / Outlook
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.061.61 ▼0.4839.42 ▼5.94
Dashboard /wp-admin2,199 ▲225.57 ▼0.0197.19 ▲8.6437.70 ▼3.31
Posts /wp-admin/edit.php2,104 ▲72.00 ▲0.0339.67 ▲5.2234.69 ▲0.28
Add New Post /wp-admin/post-new.php1,531 ▲523.55 ▲0.09662.52 ▼50.7150.94 ▼6.04
Media Library /wp-admin/upload.php1,401 ▲14.20 ▼0.0398.16 ▼11.8940.11 ▼6.33
Mail Integration 365 Settings /wp-admin/options-general.php?page=mail-integration-365-settings8902.0727.6827.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 68× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/guzzlehttp/psr7/src/NoSeekStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\League\\OAuth2\\Client\\Token\\AccessTokenInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php:17
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/guzzlehttp/psr7/src/AppendStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/guzzlehttp/psr7/src/Uri.php:14
    • > PHP Fatal error
      Uncaught Error: Class '_PhpScoper99e9e79e8301\\League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/mail-integration-365/libs/vendor/league/oauth2-client/src/Grant/Password.php:22
    • > PHP Fatal error
      Uncaught Error: Interface '_PhpScoper99e9e79e8301\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/mail-integration-365/libs/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class '_PhpScoper99e9e79e8301\\GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/mail-integration-365/libs/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:12
    • > PHP Fatal error
      Uncaught Error: Class '_PhpScoper99e9e79e8301\\League\\OAuth2\\Client\\Provider\\AbstractProvider' not found in wp-content/plugins/mail-integration-365/libs/vendor/thenetworg/oauth2-azure/src/Provider/Azure.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
5 plugin tags: outlook smtp, smtp, 365 smtp, oauth, live smtp

mail-integration-365/mail_integration_365.php 92% from 13 tests

This is the main PHP file of "WPO365 | Mail Integration for Office 365 / Outlook" version 1.9.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mail-integration-365.php" instead of "mail_integration_365.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin16,210 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP1625497,63710,388
Markdown231,54604,534
JSON17001,234
XML10019
JavaScript12311
make1409
YAML1007
Dockerfile1375
Bourne Shell1203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity11.92
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces23
Interfaces30
Traits10
Classes103
▷ Abstract classes21.94%
▷ Concrete classes10198.06%
▷ Final classes3433.66%
Methods946
▷ Static methods16217.12%
▷ Public methods75479.70%
▷ Protected methods677.08%
▷ Private methods12513.21%
Functions128
▷ Named functions3527.34%
▷ Anonymous functions9372.66%
Constants72
▷ Global constants00.00%
▷ Class constants72100.00%
▷ Public constants6184.72%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin