74% zedna-contact-form

Code Review | Zedna Contact form

WordPress plugin Zedna Contact form scored74%from 54 tests.

About plugin

  • Plugin page: zedna-contact-form
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Sep 9, 2019
  • Latest release: Mar 10, 2020
  • Number of updates: 8
  • Update frequency: every 22.9 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /501 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.85MB] [CPU: ▼30.64ms] Passed 4 tests

This is a short check of server-side resources used by Zedna Contact form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.32 ▼2.06
Dashboard /wp-admin3.09 ▼0.2135.04 ▼20.77
Posts /wp-admin/edit.php3.09 ▼0.2627.25 ▼24.11
Add New Post /wp-admin/post-new.php3.09 ▼2.7924.64 ▼66.64
Media Library /wp-admin/upload.php3.09 ▼0.1325.95 ▼11.05

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Zedna Contact form: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.55 ▼1.044.96 ▲3.1644.82 ▼0.50
Dashboard /wp-admin2,225 ▲375.91 ▲0.99104.85 ▼2.6842.48 ▲0.35
Posts /wp-admin/edit.php2,087 ▼22.02 ▲0.0535.07 ▼5.8334.34 ▼1.23
Add New Post /wp-admin/post-new.php1,537 ▲1823.21 ▲0.11635.83 ▼10.0746.90 ▼14.85
Media Library /wp-admin/upload.php1,401 ▲134.15 ▼0.02100.31 ▼1.4341.84 ▼5.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/zedna-contact-form/zedna-contact-from-attachment.php+50
    mkdir(): No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zedna-contact-form/zedna-contact-from-attachment.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Contact form)
The official readme.txt is a good inspiration

zedna-contact-form/zedna-contact-from-attachment.php 92% from 13 tests

This is the main PHP file of "Zedna Contact form" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zedna-contact-form.php" instead of "zedna-contact-from-attachment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin443 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12534309
PO File1272984
JavaScript11036
CSS13014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png7.66KB3.93KB▼ 48.73%
assets/banner-772x250.png33.95KB14.71KB▼ 56.68%
assets/screenshot-1.png18.03KB8.08KB▼ 55.20%