62% emailsystem

Code Review | EmailSystem

WordPress plugin EmailSystem scored62%from 54 tests.

About plugin

  • Plugin page: emailsystem
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.9.3
  • WordPress version: 6.3.1
  • First release: Jul 23, 2019
  • Latest release: May 23, 2022
  • Number of updates: 24
  • Update frequency: every 43.2 days
  • Top authors: emailsystem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /848 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.17MB] [CPU: ▼43.98ms] Passed 4 tests

Analyzing server-side resources used by EmailSystem
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6513.62 ▼25.65
Dashboard /wp-admin2.85 ▼0.4916.80 ▼44.51
Posts /wp-admin/edit.php2.86 ▼0.5016.82 ▼24.28
Add New Post /wp-admin/post-new.php2.85 ▼3.0318.81 ▼81.48
Media Library /wp-admin/upload.php2.85 ▼0.3714.76 ▼17.22
Settings /wp-admin/edit.php?post_type=emailsystemform&page=em_settings3.2729.11
EmailSystem /wp-admin/edit.php?post_type=emailsystemform2.8622.22
Add Form /wp-admin/post-new.php?post_type=emailsystemform2.8618.51

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for EmailSystem
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.18 ▼1.371.73 ▲0.0244.11 ▲0.79
Dashboard /wp-admin2,274 ▲894.96 ▼0.9396.18 ▼26.0875.90 ▲31.91
Posts /wp-admin/edit.php2,154 ▲652.01 ▼0.0433.71 ▼9.7829.72 ▼7.12
Add New Post /wp-admin/post-new.php1,578 ▲5923.03 ▼0.22647.16 ▼14.1958.64 ▲6.10
Media Library /wp-admin/upload.php1,453 ▲654.21 ▲0.0197.91 ▼6.8075.36 ▲33.15
Settings /wp-admin/edit.php?post_type=emailsystemform&page=em_settings9112.1537.2325.52
EmailSystem /wp-admin/edit.php?post_type=emailsystemform9142.1840.9927.06
Add Form /wp-admin/post-new.php?post_type=emailsystemform9112.1226.8125.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/emailsystem/emailsystem.php+381
    Undefined index: post_type
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=emailsystemform
    • > Notice in wp-content/plugins/emailsystem/emailsystem.php+385
    Undefined index: page

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/emailsystem/emailsystem.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=emailsystemform
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: em_php_vars is not defined" "ReferenceError: em_php_vars is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/emailsystem/assets/js/emailsystem.js?ver=6.3.1:212:108)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=emailsystemform
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught ReferenceError: em_php_vars is not defined

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: form, webform, newsletter, emailsystem, subscribe

emailsystem/emailsystem.php 92% from 13 tests

The main file in "EmailSystem" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

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
No dangerous file extensions were detected1,334 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP1513877
JavaScript100360
PO File141094
CSS2002
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/email-field.png7.77KB5.62KB▼ 27.67%
assets/images/emailsystem_white_transparent.png4.62KB2.56KB▼ 44.67%
assets/images/button-field.png16.71KB10.60KB▼ 36.55%
assets/images/text-field.png2.88KB1.01KB▼ 65.06%
assets/images/delete-form-field.png27.59KB9.94KB▼ 63.97%