84% wpcf

Code Review | WPCF

WordPress plugin WPCF scored84%from 54 tests.

About plugin

  • Plugin page: wpcf
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Apr 30, 2015
  • Latest release: May 21, 2023
  • Number of updates: 9
  • Update frequency: every 327.0 days
  • Top authors: haruncpi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,532 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
This plugin's installer ran successfully

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

An overview of server-side resources used by WPCF
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1036.97 ▼2.42
Dashboard /wp-admin3.39 ▲0.0948.01 ▼0.98
Posts /wp-admin/edit.php3.50 ▲0.1551.67 ▲0.65
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.22 ▼9.57
Media Library /wp-admin/upload.php3.31 ▲0.0836.00 ▲0.97

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WPCF
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲14813.54 ▼0.815.16 ▲3.5439.32 ▼1.90
Dashboard /wp-admin2,206 ▲185.83 ▲0.77105.54 ▼7.7739.41 ▼5.62
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0139.30 ▼0.6435.19 ▲0.34
Add New Post /wp-admin/post-new.php1,533 ▲1923.04 ▲5.57630.37 ▼45.3949.04 ▼2.74
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0295.24 ▼20.0343.75 ▼4.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 admin_url() in wp-content/plugins/wpcf/views/shortcodes/contact-form.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpcf/wpcf.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: wordpress contact form

wpcf/wpcf.php Passed 13 tests

The primary PHP file in "WPCF" version 1.1.3 is used by WordPress to initiate all plugin functionality
123 characters long description:
WPCF (Wordpress Contact Form) is simple contact form. You can add this in any where whare you need it. It support sortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected883 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP17205555764
CSS113069
JavaScript18037
JSON30013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.80
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods58
▷ Static methods2237.93%
▷ Public methods5289.66%
▷ Protected methods00.00%
▷ Private methods610.34%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.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