10% mailsystem

Code Review | Mailsystem

WordPress plugin Mailsystem scored10%from 54 tests.

About plugin

  • Plugin page: mailsystem
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1+
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: May 23, 2014
  • Number of updates: 12
  • Update frequency: every 0.2 days
  • Top authors: vdrizheruk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /760 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/mailsystem/include/MailsystemApiClient.php+13
    Undefined index: token

Server metrics [RAM: ▼1.90MB] [CPU: ▼57.56ms] Passed 4 tests

This is a short check of server-side resources used by Mailsystem
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.387.87 ▼37.21
Dashboard /wp-admin2.11 ▼1.208.01 ▼47.30
Posts /wp-admin/edit.php2.11 ▼1.257.17 ▼45.54
Add New Post /wp-admin/post-new.php2.11 ▼3.786.35 ▼100.18
Media Library /wp-admin/upload.php2.11 ▼1.126.49 ▼35.93
Settings /wp-admin/admin.php?page=mailsystem_settings2.117.43
Letters /wp-admin/admin.php?page=mailsystem_letters2.117.02
Statistics /wp-admin/admin.php?page=mailsystem_statistics2.116.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
mailsystem_options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Mailsystem: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.25 ▼0.101.86 ▼0.2842.07 ▼4.70
Dashboard /wp-admin2,226 ▲525.56 ▼0.0983.48 ▼14.9037.41 ▼6.72
Posts /wp-admin/edit.php2,131 ▲312.01 ▼0.0036.82 ▼5.2330.55 ▼7.33
Add New Post /wp-admin/post-new.php1,551 ▲2323.58 ▲0.46671.15 ▼1.8551.58 ▼11.95
Media Library /wp-admin/upload.php1,434 ▲344.18 ▼0.0796.87 ▼17.6839.60 ▼8.30
Settings /wp-admin/admin.php?page=mailsystem_settings8632.0326.4728.04
Letters /wp-admin/admin.php?page=mailsystem_letters8802.0324.4029.12
Statistics /wp-admin/admin.php?page=mailsystem_statistics8022.0025.3228.73

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/mailsystem/include/MailsystemApiClient.php+13
    Undefined index: token
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • mailsystem_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailsystem_statistics
    • > Notice in wp-content/plugins/mailsystem/include/MailsystemApiClient.php+13
    Undefined index: token
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailsystem_statistics
    • > Notice in wp-content/plugins/mailsystem/include/MailsystemAdminMenu.php+122
    Trying to get property 'data' of non-object
    • > GET request to /wp-admin/admin.php?page=mailsystem_letters
    • > Notice in wp-content/plugins/mailsystem/include/MailsystemAdminMenu.php+86
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mailsystem/views/admin_mailsystem_statistics.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/mailsystem/views/admin_mailsystem_settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailsystem/mailsystem.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/mailsystem/views/admin_mailsystem_letters.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: mailing, import, post, export, mail...

mailsystem/mailsystem.php Passed 13 tests

The main PHP file in "Mailsystem" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
37 characters long description:
mailsystem integration with wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin400 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP84876400

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.60
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods15.26%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

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