83% 9mail-wp-email-templates-designer

Code Review | 9MAIL - WordPress Email Templates Designer

WordPress plugin 9MAIL - WordPress Email Templates Designer scored 83% from 54 tests.

About plugin

  • Plugin page: 9mail-wp-email-te...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Apr 1, 2022
  • Latest release: Apr 4, 2022
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: villatheme (80%)thanhtd (40%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 34 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼283.80ms] 75% from 4 tests

This is a short check of server-side resources used by 9MAIL - WordPress Email Templates Designer
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 928.47ms on /wp-admin/edit.php?post_type=wp_email_tmpl&page=9mail-wp-email-templates-designer-extensions)
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.3984.85 ▲13.31
Dashboard /wp-admin3.85 ▲0.4475.98 ▲37.03
Posts /wp-admin/edit.php4.06 ▲0.4176.41 ▲17.83
Add New Post /wp-admin/post-new.php7.37 ▲0.41128.58 ▼1,167.30
Media Library /wp-admin/upload.php3.79 ▲0.5047.41 ▲0.96
All Emails /wp-admin/edit.php?post_type=wp_email_tmpl4.0656.85
Extensions /wp-admin/edit.php?post_type=wp_email_tmpl&page=9mail-wp-email-templates-designer-extensions3.83928.47
Add New /wp-admin/post-new.php?post_type=wp_email_tmpl4.2272.43

Server storage [IO: ▲2.82MB] [DB: ▲0.03MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 175 new files
Database: no new tables, 1 new option
New WordPress options
9mail-wp-email-templates-designer_start_use

Browser metrics Passed 4 tests

Checking browser requirements for 9MAIL - WordPress Email Templates Designer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,509 ▼23515.82 ▲0.327.03 ▼3.9242.14 ▲31.40
Dashboard /wp-admin3,106 ▲2186.42 ▲0.00193.20 ▼24.60246.86 ▲12.84
Posts /wp-admin/edit.php2,795 ▲1103.45 ▲0.03108.56 ▲20.81189.56 ▲6.54
Add New Post /wp-admin/post-new.php1,709 ▲8417.94 ▼3.03695.33 ▼25.05199.29 ▼18.49
Media Library /wp-admin/upload.php1,802 ▲1075.73 ▲0.01196.39 ▲7.99286.87 ▲29.46
All Emails /wp-admin/edit.php?post_type=wp_email_tmpl2,1893.5293.31181.57
Extensions /wp-admin/edit.php?post_type=wp_email_tmpl&page=9mail-wp-email-templates-designer-extensions2,3672.5785.89262.99
Add New /wp-admin/post-new.php?post_type=wp_email_tmpl2,8907.76200.42267.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • 9mail-wp-email-templates-designer_start_use

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=wp_email_tmpl
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload,jquery-ui-draggable&ver=5.9.2 1:31592 "jQuery.Deferred exception: Unexpected end of JSON input" "SyntaxError: Unexpected end of JSON input\n at JSON.parse (\u003Canonymous>)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/9mail-wp-email-templates-designer/assets/dist/run.js?ver=1.0.1:410:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload,jquery-ui-draggable&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload,jquery-ui-draggable&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=wp_email_tmpl
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload,jquery-ui-draggable&ver=5.9.2 1:31702 Uncaught SyntaxError: Unexpected end of JSON input

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
4 plugin tags: email template, email customizer, email, wordpress

9mail-wp-email-templates-designer/9mail-wp-email-templates-designer.php 85% from 13 tests

The main PHP file in "9MAIL - WordPress Email Templates Designer" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected13,078 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
SVG40123,847
JavaScript174461153,069
PHP17432932,747
CSS16117841,759
Sass2379181,656

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity35.33
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods118
▷ Static methods2218.64%
▷ Public methods11294.92%
▷ Protected methods10.85%
▷ Private methods54.24%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants1
▷ Global constants1100.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
95 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/yt-color-border.png0.74KB0.46KB▼ 37.30%
assets/img/phone-white-trans.png0.25KB0.24KB▼ 3.89%
assets/img/phone-black-trans.png0.25KB0.20KB▼ 18.68%
assets/img/fb-black-border.png0.82KB0.46KB▼ 43.30%
assets/img/icon-info-dark-blue-200x200-1.png6.36KB3.33KB▼ 47.64%