10% mag-mailer-form

Code Review | Mag mailer form

WordPress plugin Mag mailer form scored10%from 54 tests.

About plugin

  • Plugin page: mag-mailer-form
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Aug 11, 2015
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: magissim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /572 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/mag-mailer-form/mag-mailer-form.php+510
    Use of undefined constant mag_mailer_enqueuescripts - assumed 'mag_mailer_enqueuescripts' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.72MB] [CPU: ▼56.81ms] Passed 4 tests

Server-side resources used by Mag mailer form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.206.17 ▼40.55
Dashboard /wp-admin2.28 ▼1.026.80 ▼45.33
Posts /wp-admin/edit.php2.29 ▼1.077.26 ▼43.33
Add New Post /wp-admin/post-new.php2.28 ▼3.607.18 ▼98.02
Media Library /wp-admin/upload.php2.29 ▼0.946.52 ▼34.98
Add New /wp-admin/post-new.php?post_type=mag-mailer-form2.2910.36
All Items /wp-admin/edit.php?post_type=mag-mailer-form2.296.47

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Mag mailer form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.66 ▼0.628.41 ▲6.3641.86 ▼5.02
Dashboard /wp-admin2,222 ▲455.63 ▼0.0486.62 ▼5.5743.85 ▲6.84
Posts /wp-admin/edit.php2,130 ▲302.04 ▼0.1142.34 ▲6.7336.04 ▼0.02
Add New Post /wp-admin/post-new.php1,553 ▲2723.26 ▲0.18683.87 ▼40.8154.95 ▲2.48
Media Library /wp-admin/upload.php1,430 ▲334.22 ▲0.0397.56 ▼20.3843.57 ▼5.66
Add New /wp-admin/post-new.php?post_type=mag-mailer-form1,7292.5553.5158.48
All Items /wp-admin/edit.php?post_type=mag-mailer-form1,0912.0830.6532.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/mag-mailer-form/mag-mailer-form.php+510
    Use of undefined constant mag_mailer_enqueuescripts - assumed 'mag_mailer_enqueuescripts' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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 errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mag-mailer-form
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/mag-mailer-form/mag-mailer-form.php+510
    Use of undefined constant mag_mailer_enqueuescripts - assumed 'mag_mailer_enqueuescripts' (this will throw an Error in a future version of PHP)

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mag-mailer-form/mag-mailer-form.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mag-mailer-form/mag-mailer-form.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: forms, email, contact form

mag-mailer-form/mag-mailer-form.php 85% from 13 tests

"Mag mailer form" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected714 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP19336489
JavaScript2260105
HTML11065
CSS113155

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png47.59KB19.12KB▼ 59.82%
assets/screenshot-1.png38.76KB15.55KB▼ 59.89%
assets/screenshot-2.png41.67KB16.32KB▼ 60.83%