10% autosave-net

Code Review | AutoSave Net

WordPress plugin AutoSave Net scored 10% from 54 tests.

About plugin

  • Plugin page: autosave-net
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.6.0
  • WordPress version: 5.9.2
  • First release: Dec 15, 2016
  • Latest release: Mar 2, 2021
  • Number of updates: 17
  • Update frequency: every 90.3 days
  • Top authors: majick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 873 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/autosave-net/loader.php+333
    Undefined index: nsmespace

Server metrics [RAM: ▲4.76MB] [CPU: ▼325.29ms] Passed 4 tests

A check of server-side resources used by AutoSave Net
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.78 ▲5.2727.40 ▼27.00
Dashboard /wp-admin9.26 ▲5.8632.31 ▼6.96
Posts /wp-admin/edit.php9.27 ▲5.6232.78 ▼5.87
Add New Post /wp-admin/post-new.php9.27 ▲2.2929.72 ▼1,261.31
Media Library /wp-admin/upload.php9.27 ▲5.9733.79 ▲8.64
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius9.2730.34
WordQuest /wp-admin/admin.php?page=wordquest9.2729.40
AutoSave Net /wp-admin/admin.php?page=autosave-net9.2731.55

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 181 new files
Database: no new tables, 9 new options
New WordPress options
autosave_net
fs_debug_mode
fs_accounts
fs_active_plugins
wq_sidebar_options
fs_gdpr
fcs_sidebar_options
autosave_net_first_install
wq

Browser metrics Passed 4 tests

A check of browser resources used by AutoSave Net
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,990 ▲24614.23 ▼1.426.44 ▲0.583.12 ▲0.96
Dashboard /wp-admin3,203 ▲3456.67 ▲0.49117.49 ▼14.52213.99 ▲49.65
Posts /wp-admin/edit.php2,790 ▲1023.17 ▼0.0764.03 ▲1.86138.12 ▼6.01
Add New Post /wp-admin/post-new.php1,732 ▲1517.56 ▼3.82412.72 ▼22.64207.76 ▲47.97
Media Library /wp-admin/upload.php1,778 ▲805.86 ▲0.33124.76 ▼20.57201.34 ▲12.05
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,5052.5355.15116.67
WordQuest /wp-admin/admin.php?page=wordquest1,9443.2860.44250.30
AutoSave Net /wp-admin/admin.php?page=autosave-net1,3632.5456.34157.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/autosave-net/autosave-net.php+373
    Use of undefined constant AUTOSAVE_INTERVAL - assumed 'AUTOSAVE_INTERVAL' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 9 options
    • fs_debug_mode
    • wq
    • wq_sidebar_options
    • fcs_sidebar_options
    • fs_accounts
    • fs_active_plugins
    • autosave_net
    • fs_gdpr
    • autosave_net_first_install

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=autosave-net
    • > Warning in wp-content/plugins/autosave-net/autosave-net.php+373
    Use of undefined constant AUTOSAVE_INTERVAL - assumed 'AUTOSAVE_INTERVAL' (this will throw an Error in a future version of PHP)

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/autosave-net/freemius/templates/ajax-loader.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/autosave-net/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_action() in wp-content/plugins/autosave-net/wordquest.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autosave-net/loader.php:2774
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/autosave-net/freemius/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in autosave-net/assets to your readme.txt
You can take inspiration from this readme.txt

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

The principal PHP file in "AutoSave Net" v. 1.3.4 is loaded by WordPress automatically on each request
120 characters long description:
Auto-save safety net! Timed Backup of your Post Content while writing, with instant compare and restore content metabox.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected38,369 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1118,79318,84637,821
Markdown21080313
JavaScript33459194
JSON10027
CSS110014

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,895)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 107)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity95.27
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity107.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,270
▷ Static methods17313.62%
▷ Public methods92873.07%
▷ Protected methods151.18%
▷ Private methods32725.75%
Functions193
▷ Named functions16686.01%
▷ Anonymous functions2713.99%
Constants139
▷ Global constants11482.01%
▷ Class constants2517.99%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wordquest.png7.71KB3.13KB▼ 59.40%
images/quicksave-icons.png13.31KB4.12KB▼ 69.02%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/autosave-net.png133.94KB33.93KB▼ 74.67%
images/wordquest-icon.png1.24KB1.23KB0.40%