73% wp-performance

Code Review | WP Performance

WordPress plugin WP Performance scored73%from 54 tests.

About plugin

  • Plugin page: wp-performance
  • Plugin version: 1.1.8.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Jun 17, 2020
  • Number of updates: 81
  • Update frequency: every 6.6 days
  • Top authors: alaca (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

500+ active /19,325 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.71MB] [CPU: ▲44.59ms] Passed 4 tests

Analyzing server-side resources used by WP Performance
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8448.29 ▲4.57
Dashboard /wp-admin4.00 ▲0.65120.03 ▲54.68
Posts /wp-admin/edit.php4.11 ▲0.76104.34 ▲51.77
Add New Post /wp-admin/post-new.php6.62 ▲0.73183.80 ▲78.43
Media Library /wp-admin/upload.php3.94 ▲0.71105.84 ▲67.34

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

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • You have illegally modified 4 files (10.36KB) outside of "wp-content/plugins/wp-performance/" and "wp-content/uploads/"
    • (new file) .htaccess_wpp_backup
    • (new file) wp-content/cache/wpp-cache/index.php
    • (new file) wp-content/advanced-cache.php
    • (modified) wp-config.php
Filesystem: 237 new files
Database: no new tables, 15 new options
New WordPress options
theysaidso_admin_options
wpp_critical_css_list
wpp_theme_js_list
wpp_video_post_exclude
wpp_image_post_exclude
widget_theysaidso_widget
widget_recent-posts
db_upgraded
wpp_css_post_exclude
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Performance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲27213.79 ▼0.858.98 ▲6.9241.77 ▼7.49
Dashboard /wp-admin2,261 ▲815.73 ▲0.0691.50 ▼4.6538.48 ▼6.70
Posts /wp-admin/edit.php2,151 ▲542.08 ▲0.1139.56 ▲0.7837.41 ▲1.10
Add New Post /wp-admin/post-new.php6,329 ▲4,80326.18 ▲3.00866.56 ▲169.7136.81 ▼17.43
Media Library /wp-admin/upload.php1,477 ▲774.23 ▲0.0695.13 ▼19.8942.58 ▼1.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 68× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'voku\\helper\\DomParserInterface' not found in wp-content/plugins/wp-performance/vendor/voku/simple_html_dom/src/voku/helper/AbstractDomParser.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-performance/vendor/symfony/css-selector/Exception/ParseException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wp-performance/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPP\\Addons\\Cloudflare\\Cloudflare' not found in wp-content/plugins/wp-performance/includes/addons/cloudflare/init.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/wp-performance/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/wp-performance/vendor/symfony/css-selector/Node/FunctionNode.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\ode\odeInterface' not found in wp-content/plugins/wp-performance/vendor/symfony/css-selector/Node/AbstractNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleHtmlDomNode' not found in wp-content/plugins/wp-performance/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDomNodeBlank.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/wp-performance/vendor/symfony/css-selector/Parser/Handler/StringHandler.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractDomParser' not found in wp-content/plugins/wp-performance/vendor/voku/simple_html_dom/src/voku/helper/XmlDomParser.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: You can look at the official readme.txt

wp-performance/wp-performance.php 92% from 13 tests

This is the main PHP file of "WP Performance" version 1.1.8.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-performance/vendor/bin/minifycss.bat
      • wp-content/plugins/wp-performance/vendor/bin/minifyjs.bat
18,867 lines of code in 188 files:
LanguageFilesBlank linesComment linesLines of code
PHP1545,2978,41015,319
PO File26067991,393
JavaScript632895680
CSS318320594
JSON600461
Markdown81770290
SVG20156
YAML20035
Bourne Shell26220
Dockerfile12011
DOS Batch2008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.13
▷ Minimum class complexity1.00
▷ Maximum class complexity198.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces18
Interfaces15
Traits1
Classes93
▷ Abstract classes1111.83%
▷ Concrete classes8288.17%
▷ Final classes22.44%
Methods1,037
▷ Static methods817.81%
▷ Public methods90987.66%
▷ Protected methods817.81%
▷ Private methods474.53%
Functions132
▷ Named functions8463.64%
▷ Anonymous functions4836.36%
Constants51
▷ Global constants3772.55%
▷ Class constants1427.45%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/addons/varnish/assets/varnish.png6.22KB4.17KB▼ 32.89%
assets/placeholder.png0.90KB0.09KB▼ 89.71%