10% mailmaga-x

Code Review | Mailmaga-X

WordPress plugin Mailmaga-X scored10%from 54 tests.

About plugin

  • Plugin page: mailmaga-x
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Oct 3, 2013
  • Latest release: Oct 4, 2013
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: dawn8898 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,235 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-install.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_install has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼55.05ms] Passed 4 tests

This is a short check of server-side resources used by Mailmaga-X
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.50 ▼36.11
Dashboard /wp-admin2.13 ▼1.185.94 ▼43.49
Posts /wp-admin/edit.php2.13 ▼1.236.02 ▼48.61
Add New Post /wp-admin/post-new.php2.13 ▼3.766.82 ▼91.98
Media Library /wp-admin/upload.php2.13 ▼1.105.89 ▼30.50
Servers /wp-admin/admin.php?page=mailmaga_x_page_servers2.136.10
History /wp-admin/admin.php?page=mailmaga_x_page_history2.136.74
Users /wp-admin/admin.php?page=mailmaga_x_page_users2.135.97
Mailmaga-X /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php2.136.97

Server storage [IO: ▲0.62MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/mailmaga-x/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 28 new files
Database: 4 new tables, 7 new options
New tables
wp_mailmaga_x_users
wp_mailmaga_x_historys
wp_mailmaga_x_servers
wp_mailmaga_x_mails
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
mailmaga_x_db_version
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Mailmaga-X
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8913.67 ▼0.645.22 ▲3.3341.38 ▲2.89
Dashboard /wp-admin2,259 ▲595.89 ▲1.0499.38 ▼6.6241.81 ▼0.82
Posts /wp-admin/edit.php2,135 ▲352.00 ▼0.0538.08 ▲1.6536.48 ▼0.96
Add New Post /wp-admin/post-new.php1,568 ▲4223.35 ▲5.75626.59 ▲3.5655.33 ▼2.11
Media Library /wp-admin/upload.php1,432 ▲354.24 ▼0.01100.02 ▼3.9641.78 ▼6.10
Servers /wp-admin/admin.php?page=mailmaga_x_page_servers9332.0226.6028.22
History /wp-admin/admin.php?page=mailmaga_x_page_history9002.0526.7729.78
Users /wp-admin/admin.php?page=mailmaga_x_page_users1,0562.4636.7429.74
Mailmaga-X /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php8782.1624.2988.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-install.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_install has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • mailmaga_x_db_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-install.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_install has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-user.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_user has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-server.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_server has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-history.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_history has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-mailer.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_mailer has a deprecated constructor
  • 56 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-csv.php+686
    Array and string offset access syntax with curly braces is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Deprecated in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-csv.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; Mailmaga_x_csv has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x.php+69
    Undefined index: act
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x.php+69
    Undefined index: m
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x.php+69
    Undefined index: u
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x.php+69
    Undefined index: key
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga-x/classes/modules/Mailmaga-x.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_users
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-user.php+22
    Undefined index: action
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_users
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-user.php+56
    Undefined index: message
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_servers
    • > Notice in wp-content/plugins/mailmaga-x/templates/server_index.php+9
    Undefined property: Mailmaga_x_server::$message
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_history
    • > Notice in wp-content/plugins/mailmaga-x/templates/history_index.php+7
    Undefined property: Mailmaga_x_history::$message
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_users
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x.php+69
    Undefined index: user_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_users
    • > Notice in wp-content/plugins/mailmaga-x/templates/user_index.php+67
    Undefined index: user_group
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_users
    • > Notice in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x.php+69
    Undefined index: keyword
    • > GET request to /wp-admin/admin.php?page=mailmaga_x_page_users
    • > Notice in wp-content/plugins/mailmaga-x/templates/user_index.php+59
    Undefined property: Mailmaga_x_user::$message

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mailmaga_x' not found in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-mailer.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Mailmaga_x' not found in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-history.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/mailmaga-x/templates/user_index.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Mailmaga_x' not found in wp-content/plugins/mailmaga-x/classes/modules/Mailmaga-x-server.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mailmaga-x/templates/server_index.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mailmaga-x/templates/server_input.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mailmaga-x/templates/history_index.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mailmaga-x/templates/mail_input.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mailmaga-x/mailmaga-x.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/mailmaga-x/templates/index.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === mailmaga-x === )
  • Screenshots: Please add images for these screenshots: #1 (User List Page), #2 (New Mail Magazine), #3 (Mail Server List)
The official readme.txt is a good inspiration

mailmaga-x/mailmaga-x.php Passed 13 tests

Analyzing the main PHP file in "Mailmaga-X" version 1.0.2
88 characters long description:
Mailmaga-X is a simple and powerful plugin for sending Mail Magazines to your customers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,487 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP141864651,959
PO File211622262
JavaScript11374252
CSS11014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity52.00
▷ Minimum class complexity4.00
▷ Maximum class complexity186.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods68100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.51MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/about-user.png92.71KB27.74KB▼ 70.08%
images/about-history.png76.20KB21.70KB▼ 71.53%
screenshot-1.png112.63KB42.31KB▼ 62.44%
screenshot-2.png139.08KB47.92KB▼ 65.54%
images/about-server.png36.23KB10.52KB▼ 70.96%