84% formmemory

Code Review | FormMemory

WordPress plugin FormMemory scored84%from 54 tests.

About plugin

  • Plugin page: formmemory
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2020
  • Latest release: Aug 9, 2020
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: havierpxblck (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /562 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.20ms] Passed 4 tests

This is a short check of server-side resources used by FormMemory
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.40 ▼5.31
Dashboard /wp-admin3.36 ▲0.0651.12 ▼3.09
Posts /wp-admin/edit.php3.42 ▲0.0649.08 ▲0.97
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.06 ▼7.10
Media Library /wp-admin/upload.php3.29 ▲0.0636.84 ▼1.30
FormMemory /wp-admin/options-general.php?page=formmem3.2533.95

Server storage [IO: ▲0.03MB] [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: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
formmem_settings
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for FormMemory
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.34 ▼1.017.72 ▲5.2243.79 ▼0.44
Dashboard /wp-admin2,199 ▲225.64 ▲0.0787.93 ▼12.4440.07 ▼3.52
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0433.93 ▲0.1234.06 ▼3.59
Add New Post /wp-admin/post-new.php1,529 ▼223.04 ▲0.26646.66 ▲44.6650.20 ▲2.58
Media Library /wp-admin/upload.php1,404 ▲44.30 ▲0.0799.46 ▼1.0844.00 ▲2.64
FormMemory /wp-admin/options-general.php?page=formmem9212.0123.2150.06

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • formmem_settings
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/formmemory/admin/formmemory-admin.php
    • > /wp-content/plugins/formmemory/formmemory.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: pre-fill, remember, contact form, memory, store...

formmemory/formmemory.php Passed 13 tests

"FormMemory" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
Your contact forms will remember and pre-fill previous user input, storing it safely client-side.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected649 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP27242315
JavaScript15627247
CSS217087

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/formmemory-icon-b-transp-64.png0.90KB1.12KB0.00%