74% wp-performance-pack

Code Review | WP Performance Pack

WordPress plugin WP Performance Pack scored74%from 54 tests.

About plugin

  • Plugin page: wp-performance-pack
  • Plugin version: 2.5.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2014
  • Latest release: Sep 25, 2022
  • Number of updates: 199
  • Update frequency: every 15.9 days
  • Top authors: greencp (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /47,540 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

An overview of server-side resources used by WP Performance Pack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.71 ▼3.31
Dashboard /wp-admin3.33 ▲0.0245.94 ▼2.72
Posts /wp-admin/edit.php3.38 ▲0.0248.75 ▲0.66
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.74 ▲1.02
Media Library /wp-admin/upload.php3.25 ▲0.0236.96 ▲1.79
Performance Pack /wp-admin/options-general.php?page=wppp_options_page3.2835.79

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
wppp_option
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
wppp_version

Browser metrics Passed 4 tests

WP Performance Pack: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▼0.011.67 ▼0.1038.61 ▼3.00
Dashboard /wp-admin2,199 ▲215.65 ▼0.0891.77 ▼15.5536.75 ▼3.01
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0440.03 ▲0.8436.14 ▲0.01
Add New Post /wp-admin/post-new.php1,531 ▲523.18 ▲0.47664.63 ▲36.4968.06 ▲18.82
Media Library /wp-admin/upload.php1,407 ▲44.21 ▲0.06102.86 ▲0.7545.93 ▲1.27
Performance Pack /wp-admin/options-general.php?page=wppp_options_page1,0681.9227.7133.63

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
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/wp-performance-pack/uninstall.php+7
    scandir(wp-content/wppp): failed to open dir: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPPP_Admin_Renderer' not found in wp-content/plugins/wp-performance-pack/modules/l10n_improvements/class.wppp_l10n_improvements_advanced.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPPP_Admin_Renderer' not found in wp-content/plugins/wp-performance-pack/modules/cdn_support/class.wppp_cdn_support_advanced.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Scripts' not found in wp-content/plugins/wp-performance-pack/modules/l10n_improvements/class.wppp_scripts_override.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Rewrite' not found in wp-content/plugins/wp-performance-pack/modules/dynamic_images/class.wppp_rewrite.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPPP_Module' not found in wp-content/plugins/wp-performance-pack/modules/dynamic_images/class.wppp_dynamic_images.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Image_Editor_GD' not found in wp-content/plugins/wp-performance-pack/modules/dynamic_images/class.wp-image-editor-gd-exif.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPPP_Admin_Renderer' not found in wp-content/plugins/wp-performance-pack/modules/dynamic_images/class.wppp_dynamic_images_advanced.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPPP_Module' not found in wp-content/plugins/wp-performance-pack/modules/disable_widgets/class.wppp_disable_widgets.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/wp-performance-pack/wp-performance-pack.php:254
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Image_Editor_Imagick' not found in wp-content/plugins/wp-performance-pack/modules/dynamic_images/class.wp-image-editor-imagick-exif.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: cdn, disable, gettext, image resizing, performance

wp-performance-pack/wp-performance-pack.php Passed 13 tests

Analyzing the main PHP file in "WP Performance Pack" version 2.5.3
119 characters long description:
Performance optimizations for WordPress. Improve localization performance and image handling, serve images through CDN.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin7,967 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,0421,1076,642
CSS68474848
JavaScript332897477

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity30.18
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes13.57%
▷ Concrete classes2796.43%
▷ Final classes00.00%
Methods248
▷ Static methods83.23%
▷ Public methods23293.55%
▷ Protected methods31.21%
▷ Private methods135.24%
Functions18
▷ Named functions1161.11%
▷ Anonymous functions738.89%
Constants18
▷ Global constants1161.11%
▷ Class constants738.89%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
admin/img/wppp_logo_62x32.png2.36KB2.11KB▼ 10.60%
common/css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
common/css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
common/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%