78% wp-autosave

Code Review | Wp-autosave

WordPress plugin Wp-autosave scored 78% from 54 tests.

About plugin

  • Plugin page: wp-autosave
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2018
  • Latest release: Dec 18, 2019
  • Number of updates: 8
  • Update frequency: every 77.4 days
  • Top authors: wpautosave (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 2,774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Wp-autosave
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.75 ▲3.56
Dashboard /wp-admin3.32 ▲0.0246.40 ▲1.51
Posts /wp-admin/edit.php3.37 ▲0.0245.18 ▼0.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.37 ▼4.98
Media Library /wp-admin/upload.php3.25 ▲0.0236.86 ▲2.80
WP-autosave /wp-admin/options-general.php?page=wp-autosave3.2633.85

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

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

Browser metrics Passed 4 tests

Wp-autosave: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲10213.58 ▲0.408.04 ▲6.3840.46 ▼0.45
Dashboard /wp-admin2,217 ▲115.89 ▲1.0294.02 ▼5.6039.81 ▲0.90
Posts /wp-admin/edit.php2,100 ▲112.01 ▲0.0135.75 ▲1.3732.35 ▼2.34
Add New Post /wp-admin/post-new.php1,532 ▼118.57 ▼4.53630.26 ▼77.7960.92 ▲2.83
Media Library /wp-admin/upload.php1,399 ▲144.16 ▼0.08102.87 ▼10.7146.24 ▼0.67
WP-autosave /wp-admin/options-general.php?page=wp-autosave8772.0328.3435.19

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-autosave/public/partials/wp-autosave-public-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-autosave/wp-autosave.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-autosave/admin/partials/wp-autosave-admin-display.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

wp-autosave/wp-autosave.php Passed 13 tests

The principal PHP file in "Wp-autosave" v. 1.1.1 is loaded by WordPress automatically on each request
49 characters long description:
Auto-save your post to draft at regular intervals

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
Success! There were no dangerous files found in this plugin448 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12147558288
JavaScript34869160
CSS2070

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected