84% cx-easy-contact-form

Code Review | CX Easy Contact Form

WordPress plugin CX Easy Contact Form scored84%from 54 tests.

About plugin

  • Plugin page: cx-easy-contact-form
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2022
  • Latest release: Dec 27, 2022
  • Number of updates: 6
  • Update frequency: every 4.2 days
  • Top authors: cypheroxtechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by CX Easy Contact Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.41 ▼0.32
Dashboard /wp-admin3.39 ▲0.0940.29 ▼3.40
Posts /wp-admin/edit.php3.51 ▲0.1544.66 ▼0.19
Add New Post /wp-admin/post-new.php5.97 ▲0.0974.81 ▼11.04
Media Library /wp-admin/upload.php3.32 ▲0.0934.03 ▼0.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CX Easy Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.56 ▲0.161.54 ▼0.0538.31 ▼2.36
Dashboard /wp-admin2,209 ▲295.58 ▼0.1094.54 ▲1.6342.72 ▲1.32
Posts /wp-admin/edit.php2,117 ▲171.98 ▼0.0541.22 ▲2.4935.06 ▼0.86
Add New Post /wp-admin/post-new.php1,538 ▲1022.98 ▲0.06645.24 ▲3.4956.69 ▲2.58
Media Library /wp-admin/upload.php1,417 ▲174.18 ▼0.03100.01 ▲4.4042.28 ▲2.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cx-easy-contact-form/cx-easy-contact-settings.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/cx-easy-contact-form/cx-easy-contact-form-admin.php:5

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: Please take inspiration from this readme.txt

cx-easy-contact-form/cx-easy-contact-form.php Passed 13 tests

"CX Easy Contact Form" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
Through this contact form, you can create contacts and generate leads. For better contacts, use this simple contact form.

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
No dangerous file extensions were detected542 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44752418
CSS28064
JavaScript113260

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/plus.png3.01KB2.33KB▼ 22.80%
images/minus.png2.79KB2.27KB▼ 18.52%