62% easy-wp-optimizer

Code Review | Easy WP Optimizer - Optimize DB & WordPress

WordPress plugin Easy WP Optimizer - Optimize DB & WordPress scored62%from 54 tests.

About plugin

  • Plugin page: easy-wp-optimizer
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 6, 2016
  • Latest release: Jul 25, 2018
  • Number of updates: 44
  • Update frequency: every 16.4 days
  • Top authors: coothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,717 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.38ms] Passed 4 tests

Server-side resources used by Easy WP Optimizer - Optimize DB & WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.61 ▼1.89
Dashboard /wp-admin3.41 ▲0.1048.92 ▼2.77
Posts /wp-admin/edit.php3.45 ▲0.0947.62 ▼4.40
Add New Post /wp-admin/post-new.php6.10 ▲0.2180.08 ▼16.45
Media Library /wp-admin/upload.php3.35 ▲0.1236.05 ▼1.72
WordPress Data /wp-admin/admin.php?page=ewo_easy_wp_optimizer3.4444.38
Backup & Restore Database /wp-admin/admin.php?page=ewo_backup_database3.4135.55
/wp-admin/admin.php?page=ewo_restore_database3.4429.77
System Information /wp-admin/admin.php?page=ewo_system_info3.3834.34

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: 1 new table, 7 new options
New tables
wp_easy_wp_optimizer_backup
New WordPress options
recovery_mode_email_last_sent
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Easy WP Optimizer - Optimize DB & WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲7914.38 ▼0.152.06 ▼0.0241.10 ▼3.94
Dashboard /wp-admin2,234 ▲545.68 ▲0.0183.70 ▼11.8272.37 ▲31.21
Posts /wp-admin/edit.php2,151 ▲482.09 ▲0.0634.45 ▼5.9236.90 ▼0.21
Add New Post /wp-admin/post-new.php1,571 ▲4523.57 ▲0.29661.14 ▼9.3154.32 ▲0.62
Media Library /wp-admin/upload.php1,451 ▲544.16 ▼0.03100.01 ▼2.4273.41 ▲26.62
WordPress Data /wp-admin/admin.php?page=ewo_easy_wp_optimizer1,6821.9028.2778.06
Backup & Restore Database /wp-admin/admin.php?page=ewo_backup_database1,2021.8227.5237.48
/wp-admin/admin.php?page=ewo_restore_database8691.377.5527.12
System Information /wp-admin/admin.php?page=ewo_system_info1,4571.6924.1939.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_easy_wp_optimizer_backup
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • recovery_mode_email_last_sent

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
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=ewo_restore_database
    • > Error in wp-content/plugins/easy-wp-optimizer/includes/class/DbManage.class.php+58
    Uncaught Error: Call to undefined function mysql_connect() in wp-content/plugins/easy-wp-optimizer/includes/class/DbManage.class.php:58
    Stack trace:
    #0 wp-content/plugins/easy-wp-optimizer/includes/lib/wordpress-data/restore-database.php(45): ewo_DbManage->__construct()
    #1 wp-content/plugins/easy-wp-optimizer/includes/ewo-page.php(99): include_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): ewo_restore_database()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php
  • 57× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: ewo_empty_manual_clean_up15 in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 139
    • > PHP Notice
      Undefined variable: ewo_success in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 71
    • > PHP Notice
      Undefined variable: ewo_success in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 160
    • > PHP Notice
      Undefined variable: ewo_empty_manual_clean_up10 in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 114
    • > PHP Notice
      Undefined variable: ewo_success in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 67
    • > PHP Notice
      Undefined variable: ewo_choose_clean_data in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ewo_check_user() in wp-content/plugins/easy-wp-optimizer/includes/ewo-page.php:2
    • > PHP Notice
      Undefined variable: ewo_empty_manual_clean_up5 in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 89
    • > PHP Notice
      Undefined variable: ewo_success in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 110
    • > PHP Notice
      Undefined variable: ewo_success in wp-content/plugins/easy-wp-optimizer/includes/inc/footer.php on line 90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: database optimize, restore wordpress database, delete revision, backup posts, backup wordpress database...

easy-wp-optimizer/easy-wp-optimizer.php 92% from 13 tests

The main PHP file in "Easy WP Optimizer - Optimize DB & WordPress" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 159 characters long)

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
Everything looks great! No dangerous files found in this plugin5,882 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP144302683,314
CSS383361,338
JavaScript217743860
PO File1138138317
SVG10053

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity55.00
▷ Minimum class complexity55.00
▷ Maximum class complexity55.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods741.18%
▷ Protected methods00.00%
▷ Private methods1058.82%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/icons.png3.20KB0.77KB▼ 75.90%
includes/images/process.png6.55KB2.39KB▼ 63.51%