73% zem-email-system

Code Review | Zem Email System

WordPress plugin Zem Email System scored 73% from 54 tests.

About plugin

  • Plugin page: zem-email-system
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 5.9.2
  • First release: Jul 12, 2016
  • Latest release: Jul 13, 2016
  • Number of updates: 5
  • Update frequency: every 32.4 days
  • Top authors: ashezad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 569 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼292.59ms] Passed 4 tests

Server-side resources used by Zem Email System
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1756.44 ▲4.41
Dashboard /wp-admin3.53 ▲0.1233.82 ▼0.29
Posts /wp-admin/edit.php3.76 ▲0.1138.64 ▼0.03
Add New Post /wp-admin/post-new.php7.00 ▲0.0291.84 ▼1,174.19
Media Library /wp-admin/upload.php3.41 ▲0.1126.61 ▲4.16
Send Email /wp-admin/admin.php?page=sendemail3.4727.59
Email Templates /wp-admin/admin.php?page=emailtemplate3.4323.80
Settings /wp-admin/admin.php?page=settings3.3522.49
Email Addresses /wp-admin/admin.php?page=emailaddress3.4224.74
Zem Email System /wp-admin/admin.php?page=zememailsystem3.4026.01
Groups /wp-admin/admin.php?page=groups3.4323.81

Server storage [IO: ▲1.00MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 51 new files
Database: 4 new tables, 3 new options
New tables
wp_zememailsystem_emailtemplates
wp_zememailsystem_settings
wp_zememailsystem_emailaddress
wp_zememailsystem_groups
New WordPress options
zemes_p_size
zemes_sender_name
zemes_sender_email

Browser metrics Passed 4 tests

An overview of browser requirements for Zem Email System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,812 ▲6716.17 ▲0.595.89 ▼2.002.36 ▲0.10
Dashboard /wp-admin2,941 ▲806.04 ▼0.16118.02 ▼28.49157.40 ▼15.27
Posts /wp-admin/edit.php2,737 ▲433.24 ▲0.0167.73 ▲4.69146.14 ▲11.74
Add New Post /wp-admin/post-new.php1,791 ▲13022.47 ▲6.28408.71 ▼7.45161.20 ▲9.76
Media Library /wp-admin/upload.php1,752 ▲545.53 ▲0.04142.12 ▲0.97184.76 ▲2.45
Send Email /wp-admin/admin.php?page=sendemail1,8237.29136.03179.52
Email Templates /wp-admin/admin.php?page=emailtemplate1,2202.4253.61160.92
Settings /wp-admin/admin.php?page=settings1,0952.3653.84103.14
Email Addresses /wp-admin/admin.php?page=emailaddress1,1522.3752.98158.31
Zem Email System /wp-admin/admin.php?page=zememailsystem1,2422.4454.66136.26
Groups /wp-admin/admin.php?page=groups1,3852.4052.29148.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 3 options
    • zemes_p_size
    • zemes_sender_name
    • zemes_sender_email

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=settings
    • > Warning in wp-content/plugins/zem-email-system/_resource/classes/includer.php+32
    include_once(wp-content/plugins/zem-email-system/source/settings/handler.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=settings
    • > Warning in wp-content/plugins/zem-email-system/_resource/classes/includer.php+32
    include_once(): Failed opening 'wp-content/plugins/zem-email-system/source/settings/handler.php' for inclusion (include_path='.:/usr/share/php')

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 26× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/zem-email-system/source/groups/class.php
    • > /wp-content/plugins/zem-email-system/_resource/classes/activation.php
    • > /wp-content/plugins/zem-email-system/_resource/classes/request.php
    • > /wp-content/plugins/zem-email-system/_resource/classes/messages.php
    • > /wp-content/plugins/zem-email-system/source/sendemail/handler.php
    • > /wp-content/plugins/zem-email-system/main.zemes.php
    • > /wp-content/plugins/zem-email-system/_resource/classes/tables/emailaddress.php
    • > /wp-content/plugins/zem-email-system/_resource/classes/layout.php
    • > /wp-content/plugins/zem-email-system/_resource/classes/formfield.php
    • > /wp-content/plugins/zem-email-system/source/settings/class.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/zem-email-system/source/zememailsystem/tmpl/_mainpage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/zem-email-system/source/emailtemplate/tmpl/_formemailtemplate.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'zemesMessages' not found in wp-content/plugins/zem-email-system/source/emailaddress/tmpl/_emailaddresses.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'zemesMessages' not found in wp-content/plugins/zem-email-system/source/sendemail/tmpl/_formsendemail.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/zem-email-system/source/groups/tmpl/_formgroup.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/zem-email-system/source/emailaddress/tmpl/_formemailaddress.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'zemesMessages' not found in wp-content/plugins/zem-email-system/source/groups/tmpl/_groups.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'zemesMessages' not found in wp-content/plugins/zem-email-system/source/emailtemplate/tmpl/_emailtemplates.php:2

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

zem-email-system/zem-email-system.php Passed 13 tests

Analyzing the main PHP file in "Zem Email System" version 1.0.0
119 characters long description:
ZEM emailsystem is easy to use Emailsystem. Zem emailsystem has an easy admin interface, user can send email in groups.

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
Everything looks great! No dangerous files found in this plugin2,635 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP36213201,794
SVG100685
CSS3233156

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.84
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods112
▷ Static methods4338.39%
▷ Public methods10795.54%
▷ Protected methods10.89%
▷ Private methods43.57%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_resource/images/notice.png0.46KB0.48KB0.00%
_resource/images/success.png0.69KB0.65KB▼ 5.54%
_resource/images/error.png0.70KB0.74KB0.00%
_resource/images/warning.png0.47KB0.45KB▼ 4.14%