84% wp-libre-form

Code Review | WP Libre Form

WordPress plugin WP Libre Form scored 84% from 54 tests.

About plugin

  • Plugin page: wp-libre-form
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Oct 24, 2017
  • Number of updates: 43
  • Update frequency: every 22.3 days
  • Top authors: Zuige (95.35%)k1sul1 (6.98%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 3,910 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.25MB] [CPU: ▼4.99ms] Passed 4 tests

A check of server-side resources used by WP Libre Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2837.90 ▼4.72
Dashboard /wp-admin3.54 ▲0.2443.33 ▼5.52
Posts /wp-admin/edit.php3.67 ▲0.3150.54 ▲6.07
Add New Post /wp-admin/post-new.php6.14 ▲0.2584.61 ▼9.23
Media Library /wp-admin/upload.php3.47 ▲0.2436.49 ▼0.49
All Forms /wp-admin/edit.php?post_type=wplf-form3.5235.99
New Form /wp-admin/post-new.php?post_type=wplf-form3.5648.15
Submissions /wp-admin/edit.php?post_type=wplf-submission3.5244.32

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

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

Browser metrics Passed 4 tests

WP Libre Form: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.24 ▼1.141.60 ▼0.2143.23 ▼1.83
Dashboard /wp-admin2,237 ▲495.83 ▼0.0598.40 ▼9.5538.59 ▼8.81
Posts /wp-admin/edit.php2,123 ▲371.97 ▼0.0338.79 ▲2.8633.79 ▲0.11
Add New Post /wp-admin/post-new.php1,562 ▲4323.18 ▼0.11651.95 ▼15.1250.92 ▼3.27
Media Library /wp-admin/upload.php1,419 ▲314.22 ▲0.0297.17 ▼0.8243.08 ▼1.94
All Forms /wp-admin/edit.php?post_type=wplf-form1,1001.9330.5329.13
New Form /wp-admin/post-new.php?post_type=wplf-form2,3674.2182.0053.86
Submissions /wp-admin/edit.php?post_type=wplf-submission1,1292.0030.2230.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-libre-form/inc/wplf-ajax.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-libre-form/inc/wplf-form-actions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-libre-form/inc/wplf-form-validation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-libre-form/inc/wplf-ajax.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: contact, collector, html, form, lead...

wp-libre-form/wp-libre-form.php Passed 13 tests

The main PHP script in "WP Libre Form" version 1.4.3 is automatically included on every request by WordPress
62 characters long description:
A minimal HTML form builder for WordPress; made for developers

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
Good job! No executable or dangerous file extensions detected2,013 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP142844171,285
PO File2144159348
Markdown2750162
JavaScript44229149
XML1315051
JSON20017
SVG1001

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.37
Average class complexity21.43
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods77
▷ Static methods1114.29%
▷ Public methods7597.40%
▷ Protected methods00.00%
▷ Private methods22.60%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 1.39MB with 0.85MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png66.83KB24.68KB▼ 63.07%
assets/icon-256x256.png9.89KB4.91KB▼ 50.41%
assets/icon-128x128.png5.12KB2.67KB▼ 47.95%
assets/screenshot-3.png181.89KB50.29KB▼ 72.35%
assets/screenshot-4.png252.17KB69.26KB▼ 72.53%