89% wpsimplebackup

Code Review | WP Simple Backup

WordPress plugin WP Simple Backup scored89%from 54 tests.

About plugin

  • Plugin page: wpsimplebackup
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: May 22, 2017
  • Latest release: Nov 20, 2017
  • Number of updates: 4
  • Update frequency: every 45.5 days
  • Top authors: lpkapil008 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /983 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.36ms] Passed 4 tests

Analyzing server-side resources used by WP Simple Backup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.56 ▼1.43
Dashboard /wp-admin3.38 ▲0.0346.73 ▼11.52
Posts /wp-admin/edit.php3.41 ▲0.0542.61 ▼7.23
Add New Post /wp-admin/post-new.php6.07 ▲0.1879.16 ▼19.29
Media Library /wp-admin/upload.php3.31 ▲0.0935.01 ▼3.38
Settings /wp-admin/admin.php?page=wpsimplebackup/views/settings/setting.php3.2733.41
WP Simple Backup /wp-admin/admin.php?page=wpsimplebackup/views/settings/listing.php3.2930.35

Server storage [IO: ▲0.38MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • There were 2 files (0.14KB) illegally modified outside of "wp-content/plugins/wpsimplebackup/" and "wp-content/uploads/"
    • (new file) wp-content/wpsimplebackup/backup/database/.htaccess
    • (new file) wp-content/wpsimplebackup/backup/code/.htaccess
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Simple Backup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.28 ▼1.104.56 ▲2.9544.00 ▲3.51
Dashboard /wp-admin2,233 ▲454.85 ▼1.0198.66 ▼2.5044.23 ▼1.02
Posts /wp-admin/edit.php2,119 ▲332.02 ▲0.0337.76 ▼2.9633.67 ▼1.23
Add New Post /wp-admin/post-new.php1,536 ▲1017.76 ▼5.64662.60 ▼2.6458.70 ▲1.58
Media Library /wp-admin/upload.php1,418 ▲364.25 ▲0.0996.83 ▼2.0343.84 ▼0.21
Settings /wp-admin/admin.php?page=wpsimplebackup/views/settings/setting.php9292.1334.2962.51
WP Simple Backup /wp-admin/admin.php?page=wpsimplebackup/views/settings/listing.php1,1332.4847.8540.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt might help

wpsimplebackup/WpSimpleBackup.php 85% from 13 tests

The entry point to "WP Simple Backup" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wpsimplebackup.php" instead of "WpSimpleBackup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,127 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP17178397856
JavaScript31114217
CSS49847
JSON1107

PHP code Passed 2 tests

Analyzing 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.42
Average class complexity10.67
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods54
▷ Static methods2138.89%
▷ Public methods4379.63%
▷ Protected methods00.00%
▷ Private methods1120.37%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/icon.png0.47KB0.47KB0.41%
assets/images/sort_both.png0.20KB0.29KB0.00%