89% cf7-autosaver

Code Review | Autosaver for Contact Form 7

WordPress plugin Autosaver for Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: cf7-autosaver
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 22, 2015
  • Latest release: Nov 26, 2020
  • Number of updates: 7
  • Update frequency: every 266.0 days
  • Top authors: Bishoy.A (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.14ms] Passed 4 tests

Server-side resources used by Autosaver for Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.54 ▼0.61
Dashboard /wp-admin3.33 ▼0.0146.75 ▼18.57
Posts /wp-admin/edit.php3.38 ▲0.0349.10 ▼0.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.65 ▼9.25
Media Library /wp-admin/upload.php3.25 ▲0.0334.45 ▲0.22

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Autosaver for Contact Form 7: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲2614.21 ▼0.411.67 ▼0.1244.18 ▲0.47
Dashboard /wp-admin2,203 ▲235.57 ▼0.0993.35 ▲6.9138.43 ▼4.82
Posts /wp-admin/edit.php2,109 ▲91.98 ▲0.0239.76 ▲3.1136.39 ▲5.37
Add New Post /wp-admin/post-new.php1,534 ▲823.44 ▼0.10681.24 ▼0.0358.13 ▼0.21
Media Library /wp-admin/upload.php1,411 ▲114.31 ▲0.09103.14 ▲0.0548.51 ▲3.27

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 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
4 plugin tags: auto-save, contact form 7, facebook, cookie

cf7-autosaver/autosaver-for-cf7.php 77% from 13 tests

Analyzing the main PHP file in "Autosaver for Contact Form 7" version 1.0.1
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cf7-autosaver.php" instead of "autosaver-for-cf7.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin574 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4135434524
JavaScript211639
CSS13511

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.67
▷ Minimum class complexity11.00
▷ Maximum class complexity44.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods44
▷ Static methods36.82%
▷ Public methods3477.27%
▷ Protected methods715.91%
▷ Private methods36.82%
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
There were not PNG files found in your plugin