10% wprecovery

Code Review | WPRecovery

WordPress plugin WPRecovery scored10%from 54 tests.

About plugin

  • Plugin page: wprecovery
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2015
  • Latest release: Oct 21, 2016
  • Number of updates: 9
  • Update frequency: every 67.7 days
  • Top authors: cmshelplive (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /5,358 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wprecovery/index.php+115
    Undefined index: action

Server metrics [RAM: ▼0.93MB] [CPU: ▼32.83ms] Passed 4 tests

A check of server-side resources used by WPRecovery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0435.94 ▼8.14
Dashboard /wp-admin3.02 ▼0.2923.63 ▼32.54
Posts /wp-admin/edit.php3.02 ▼0.3427.81 ▼19.45
Add New Post /wp-admin/post-new.php3.02 ▼2.8726.64 ▼67.70
Media Library /wp-admin/upload.php3.02 ▼0.2121.82 ▼11.64
Support /wp-admin/admin.php?page=ocrb_support3.0223.27
WPRecovery /wp-admin/admin.php?page=ocrb_settings3.0226.61

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

How much does this plugin use your filesystem and database?
Please fix the following
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/wprecovery/" and "wp-content/uploads/"
    • (new file) wp-content/wprecovery_backup/.empty
Filesystem: 23 new files
Database: 1 new table, 6 new options
New tables
wp_ocrb_backup
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WPRecovery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲10213.38 ▼1.011.93 ▼0.0640.81 ▼1.80
Dashboard /wp-admin2,234 ▲465.13 ▼0.84108.89 ▲1.2940.26 ▼4.90
Posts /wp-admin/edit.php2,123 ▲342.45 ▲0.3936.17 ▼0.4231.19 ▼0.85
Add New Post /wp-admin/post-new.php1,545 ▲3123.67 ▲6.17672.75 ▲5.4548.14 ▼9.06
Media Library /wp-admin/upload.php1,425 ▲374.25 ▲0.0499.84 ▲3.0742.09 ▼1.73
Support /wp-admin/admin.php?page=ocrb_support8761.8828.5028.01
WPRecovery /wp-admin/admin.php?page=ocrb_settings1,0981.8826.1322.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ocrb_settings
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% 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
Please fix the following items
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wprecovery/rollback.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprecovery/functions/core.php:334
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wprecovery/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wprecovery/settings.php:3
    • > PHP Notice
      Undefined index: data in wp-content/plugins/wprecovery/rollback.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function prepare() on null in wp-content/plugins/wprecovery/rollback.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprecovery/functions/interface.php:223
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wprecovery/rollback.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wprecovery/advanced.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wprecovery/support.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 62 tag instead of maximum 10
  • Donate link: Invalid URI ("")
The official readme.txt might help

wprecovery/index.php 92% from 13 tests

The primary PHP file in "WPRecovery" version 2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wprecovery.php" instead of "index.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 plugin10,531 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS22,19046,820
PHP122,0711,1011,944
JavaScript15771911,538
SVG100229

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity113.33
▷ Minimum class complexity15.00
▷ Maximum class complexity219.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods100
▷ Static methods44.00%
▷ Public methods8989.00%
▷ Protected methods22.00%
▷ Private methods99.00%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/profile-icon2.png0.66KB0.67KB0.00%
images/rating.png0.59KB0.61KB0.00%
images/support-icon.png0.41KB0.47KB0.00%