84% artifact-form-saver

Code Review | Artifact Form Saver

WordPress plugin Artifact Form Saver scored84%from 54 tests.

About plugin

  • Plugin page: artifact-form-saver
  • Plugin version: 1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 28, 2019
  • Latest release: Aug 29, 2019
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: artifactisaac (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.01MB] [CPU: ▼3.82ms] Passed 4 tests

This is a short check of server-side resources used by Artifact Form Saver
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.84 ▲2.46
Dashboard /wp-admin3.31 ▲0.0150.46 ▲4.37
Posts /wp-admin/edit.php3.36 ▲0.0148.29 ▲2.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.01 ▼20.04
Media Library /wp-admin/upload.php3.23 ▲0.0135.29 ▲0.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Artifact Form Saver
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲13513.58 ▼0.806.05 ▲4.1937.49 ▼3.96
Dashboard /wp-admin2,203 ▲155.83 ▼0.0298.63 ▼1.9344.06 ▲0.01
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0435.72 ▼0.9729.71 ▼3.98
Add New Post /wp-admin/post-new.php1,533 ▲1223.26 ▲0.04660.98 ▼32.6562.39 ▼3.54
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.0293.00 ▼7.0446.60 ▲2.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/artifact-form-saver/artifact-form-saver.php:15

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: form saver, form, form save, forms, save progress

artifact-form-saver/artifact-form-saver.php 85% from 13 tests

The entry point to "Artifact Form Saver" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "4")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 580 characters long)

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
There were no executable files found in this plugin12 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131211
JavaScript1011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin