90% wpcasa-contact-form-7

Code Review | WPCasa Contact Form 7

WordPress plugin WPCasa Contact Form 7 scored90%from 54 tests.

About plugin

  • Plugin page: wpcasa-contact-fo...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 19, 2016
  • Latest release: Nov 15, 2023
  • Number of updates: 16
  • Update frequency: every 172.9 days
  • Top authors: wpSight (93.75%)deployer (12.5%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /8,782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.94ms] Passed 4 tests

A check of server-side resources used by WPCasa Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0434.54 ▼5.63
Dashboard /wp-admin3.35 ▲0.0445.52 ▼0.02
Posts /wp-admin/edit.php3.40 ▲0.0446.82 ▼1.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.47 ▼23.39
Media Library /wp-admin/upload.php3.27 ▲0.0429.34 ▼1.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPCasa Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.54 ▲0.191.58 ▼0.2435.87 ▼8.90
Dashboard /wp-admin2,198 ▲215.58 ▼0.0588.24 ▼9.7040.26 ▼4.00
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0139.03 ▲3.7135.33 ▼0.93
Add New Post /wp-admin/post-new.php1,526 ▼023.47 ▲0.58652.23 ▼5.2651.51 ▼10.94
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0297.84 ▼4.9842.44 ▼1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt is a good inspiration

wpcasa-contact-form-7/wpcasa-contact-form-7.php Passed 13 tests

The entry point to "WPCasa Contact Form 7" version 1.2.1 is a PHP file that has certain tags in its header comment area
110 characters long description:
Add support for Contact Form 7 to attach property details to the contact email sent from WPCasa listing pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin412 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2102235220
PO File25858178
CSS22014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.00
▷ Minimum class complexity4.00
▷ Maximum class complexity26.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin