84% cf7-better-ui

Code Review | Better UI for Contact Form 7

WordPress plugin Better UI for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: cf7-better-ui
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2019
  • Latest release: Aug 1, 2019
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: kovalchik8 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /893 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.70ms] Passed 4 tests

Analyzing server-side resources used by Better UI for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.29 ▲1.90
Dashboard /wp-admin3.36 ▲0.0151.41 ▼16.70
Posts /wp-admin/edit.php3.41 ▲0.0557.27 ▲6.31
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.37 ▼13.51
Media Library /wp-admin/upload.php3.28 ▲0.0541.71 ▲1.53

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better UI for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16313.57 ▼0.969.85 ▲7.9340.32 ▼7.11
Dashboard /wp-admin2,232 ▲555.78 ▲0.2290.72 ▼5.7441.58 ▼9.50
Posts /wp-admin/edit.php2,145 ▲452.44 ▲0.4142.55 ▲6.6636.82 ▼0.17
Add New Post /wp-admin/post-new.php1,560 ▲3223.24 ▲0.24655.37 ▼29.8134.27 ▼24.80
Media Library /wp-admin/upload.php1,434 ▲344.42 ▲0.22100.80 ▼19.5042.58 ▼6.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/cf7-better-ui/includes/plugin-page.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cf7-better-ui/cf7-better-ui.php:96

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: better style, better ui, contact form 7, email, contact...

cf7-better-ui/cf7-better-ui.php Passed 13 tests

The main file in "Better UI for Contact Form 7" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Tiny plugin which improves UI for Contact Form 7

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
There were no executable files found in this plugin1,138 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS316311894
PHP23922168
JavaScript2171176

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.87KB16.81KB▼ 43.72%
screenshot-2.png26.34KB13.21KB▼ 49.83%