79% mango-contact-form

Code Review | Mango Contact Form

WordPress plugin Mango Contact Form scored79%from 54 tests.

About plugin

  • Plugin page: mango-contact-form
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.2-4.9.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Feb 12, 2018
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: jjvasquez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.39ms] Passed 4 tests

Server-side resources used by Mango Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.46 ▼4.72
Dashboard /wp-admin3.32 ▲0.0245.46 ▼3.65
Posts /wp-admin/edit.php3.37 ▲0.0148.74 ▼0.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.59 ▼4.23
Media Library /wp-admin/upload.php3.24 ▲0.0137.00 ▲0.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mango Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲18414.05 ▼0.236.09 ▲4.1242.49 ▼4.94
Dashboard /wp-admin2,210 ▲224.85 ▼0.05108.88 ▲2.9941.71 ▲1.03
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0639.45 ▼0.4134.56 ▼2.07
Add New Post /wp-admin/post-new.php1,532 ▲1523.50 ▲5.96658.06 ▲55.0355.31 ▼0.55
Media Library /wp-admin/upload.php1,395 ▲44.18 ▼0.0598.28 ▲1.2543.04 ▼0.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mango-contact-form/admin/partials/mango-contact-form-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mango-contact-form/public/partials/mango-contact-form-public-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: contact form, ajax contact form, contact to admin email

mango-contact-form/mango-contact-form.php Passed 13 tests

The primary PHP file in "Mango Contact Form" version 1.0.0 is used by WordPress to initiate all plugin functionality
28 characters long description:
Simple a usefull contat form

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
Success! There were no dangerous files found in this plugin596 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP14171579317
PO File36978177
JavaScript272775
CSS26827

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.22
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected