84% speed-up-contact-form-7

Code Review | Speed up Contact Form 7

WordPress plugin Speed up Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: speed-up-contact-...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 27, 2021
  • Latest release: Jun 4, 2021
  • Number of updates: 9
  • Update frequency: every 14.2 days
  • Top authors: hellafast (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /1,884 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.00MB] [CPU: ▼5.92ms] Passed 4 tests

This is a short check of server-side resources used by Speed up Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.14 ▼0.18
Dashboard /wp-admin3.31 ▼0.0343.85 ▼12.36
Posts /wp-admin/edit.php3.36 ▲0.0150.19 ▲1.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.03 ▼11.11
Media Library /wp-admin/upload.php3.24 ▲0.0132.65 ▼0.04

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Speed up Contact Form 7: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.65 ▲0.1142.59 ▲1.05
Dashboard /wp-admin2,198 ▲215.62 ▲0.0390.70 ▲4.9540.03 ▼0.54
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0138.93 ▲4.4534.80 ▼2.74
Add New Post /wp-admin/post-new.php1,535 ▲718.11 ▼4.85630.93 ▼18.9065.42 ▲17.01
Media Library /wp-admin/upload.php1,397 ▼04.19 ▲0.0294.17 ▲0.3542.23 ▲1.11

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

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

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
Good news, no errors were detected

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/speed-up-contact-form-7/index.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

speed-up-contact-form-7/index.php 92% from 13 tests

The main PHP file in "Speed up Contact Form 7" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("speed-up-contact-form-7.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,368 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
SVG1001,347
PHP1161121

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png94.67KB26.54KB▼ 71.96%
assets/icon-128x128.png26.17KB8.27KB▼ 68.39%