83% mailclient

Code Review | Free MailClient FMC

WordPress plugin Free MailClient FMC scored83%from 54 tests.

About plugin

  • Plugin page: mailclient
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2015
  • Latest release: Oct 26, 2015
  • Number of updates: 32
  • Update frequency: every 0.1 days
  • Top authors: cstoltenkamp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,096 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.04MB] [CPU: ▼5.07ms] Passed 4 tests

An overview of server-side resources used by Free MailClient FMC
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.50 ▼0.59
Dashboard /wp-admin3.34 ▲0.0450.79 ▼4.99
Posts /wp-admin/edit.php3.46 ▲0.1050.15 ▼4.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0498.46 ▼10.15
Media Library /wp-admin/upload.php3.27 ▲0.0438.72 ▲3.14
Mail /wp-admin/admin.php?page=mailbox3.2536.24
Init /wp-admin/admin.php?page=mailinit3.2434.22
Documentation /wp-admin/admin.php?page=maildoc3.2431.33

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Free MailClient FMC
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲4014.24 ▲0.231.91 ▼0.0944.91 ▲4.46
Dashboard /wp-admin2,231 ▲575.56 ▲0.0284.47 ▼11.0238.23 ▼7.43
Posts /wp-admin/edit.php2,133 ▲302.03 ▲0.0339.34 ▲1.0735.01 ▼2.43
Add New Post /wp-admin/post-new.php1,562 ▲3618.10 ▼4.96614.61 ▼62.0064.88 ▲6.93
Media Library /wp-admin/upload.php1,436 ▲364.21 ▲0.0299.53 ▼11.5743.86 ▼1.47
Mail /wp-admin/admin.php?page=mailbox7581.518.2426.13
Init /wp-admin/admin.php?page=mailinit8502.0225.1027.36
Documentation /wp-admin/admin.php?page=maildoc1,1502.1223.5332.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not an exhaustive test

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
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant MAILCLIENT_PLUGIN_URL - assumed 'MAILCLIENT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailclient/mailclient_doc.php on line 21
    • > PHP Warning
      include_once(MAILCLIENT_PLUGIN_DIR/include/control_mailclient.php): failed to open stream: No such file or directory in wp-content/plugins/mailclient/mailclient_init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mailclient/mailclient_no_imap.php:4
    • > PHP Warning
      Use of undefined constant MAILCLIENT_PLUGIN_URL - assumed 'MAILCLIENT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailclient/mailclient_doc.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_username() on null in wp-content/plugins/mailclient/mailclient_delete.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mailclient/mailclient_doc.php:45
    • > PHP Warning
      Use of undefined constant MAILCLIENT_PLUGIN_URL - assumed 'MAILCLIENT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailclient/mailclient_doc.php on line 31
    • > PHP Warning
      Use of undefined constant MAILCLIENT_PLUGIN_DIR - assumed 'MAILCLIENT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailclient/mailclient_init.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'MAILCLIENT_PLUGIN_DIR/include/control_mailclient.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mailclient/mailclient_init.php on line 2
    • > PHP Notice
      Undefined variable: mailControl in wp-content/plugins/mailclient/mailclient_delete.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === mailclient === )
The official readme.txt might help

mailclient/oMailClient.php 92% from 13 tests

"Free MailClient FMC" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mailclient.php" instead of "oMailClient.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,473 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP121245781,074
PO File3261498219
CSS11220180

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity36.25
▷ Minimum class complexity6.00
▷ Maximum class complexity91.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods58
▷ Static methods00.00%
▷ Public methods4068.97%
▷ Protected methods00.00%
▷ Private methods1831.03%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.78MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/inbox.png27.74KB13.49KB▼ 51.37%
css/e-mail.png79.63KB31.01KB▼ 61.06%
images/Createmailclient_Demonstratie.png330.57KB129.63KB▼ 60.79%
images/edit_25.png0.38KB0.25KB▼ 32.99%
images/delete.png1.96KB1.68KB▼ 14.14%