74% advanced-wpperformance

Code Review | Advanced WPPerformance

WordPress plugin Advanced WPPerformance scored 74% from 54 tests.

About plugin

  • Plugin page: advanced-wpperfor...
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Aug 3, 2017
  • Latest release: Jan 31, 2019
  • Number of updates: 57
  • Update frequency: every 9.6 days
  • Top authors: nico_martin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 3,662 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.00ms] Passed 4 tests

An overview of server-side resources used by Advanced WPPerformance
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1330.35 ▼13.90
Dashboard /wp-admin3.41 ▲0.1044.57 ▼12.09
Posts /wp-admin/edit.php3.52 ▲0.1745.56 ▼0.37
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.29 ▼1.63
Media Library /wp-admin/upload.php3.33 ▲0.1038.50 ▲4.46
Asset Delivery /wp-admin/admin.php?page=awpp-assets3.3033.72
Basics /wp-admin/admin.php?page=advanced-wpperformance3.3033.04
Server Settings /wp-admin/admin.php?page=awpp-server3.3033.08

Server storage [IO: ▲0.30MB] [DB: ▲0.08MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • There were 29 files (550.73KB) illegally modified outside of "wp-content/plugins/advanced-wpperformance/" and "wp-content/uploads/"
    • (new file) wp-content/cache/awpp/css/8f6f69a0.css
    • (new file) wp-content/cache/awpp/css/9cf648b8.css
    • (new file) wp-content/cache/awpp/css/76171687.css
    • (new file) wp-content/cache/awpp/css/78f4485e.css
    • (new file) wp-content/cache/awpp/css/b73fc866.css
    • (new file) wp-content/cache/awpp/critical/.empty
    • (new file) wp-content/cache/awpp/css/abe2a7eb.css
    • (new file) wp-content/cache/awpp/css/a4f7005c.css
    • (new file) wp-content/cache/awpp/css/a547c212.css
    • (new file) wp-content/cache/awpp/css/3295e119.css
    • ...
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
awpp_data
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced WPPerformance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,996 ▲26113.79 ▼0.607.81 ▲6.1332.97 ▼13.51
Dashboard /wp-admin2,294 ▲1065.05 ▼0.86113.67 ▲6.1243.36 ▲1.25
Posts /wp-admin/edit.php2,175 ▲862.15 ▲0.1538.31 ▲3.2134.19 ▲1.99
Add New Post /wp-admin/post-new.php1,323 ▼22413.70 ▼4.75351.10 ▼285.6149.77 ▼17.34
Media Library /wp-admin/upload.php1,477 ▲894.40 ▲0.19107.26 ▲4.0848.01 ▲3.68
Asset Delivery /wp-admin/admin.php?page=awpp-assets9242.1729.2831.24
Basics /wp-admin/admin.php?page=advanced-wpperformance9072.1625.6828.81
Server Settings /wp-admin/admin.php?page=awpp-server9722.2226.9932.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-includes/plugin.php+1006
    Undefined offset: 1
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-wpperformance/advanced-wpperformance.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/minify/src/CSS.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/minify/src/Exceptions/FileImportException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'nicomartin\\CriticalAPI\\Init' not found in wp-content/plugins/advanced-wpperformance/Classes/critical-api/class-adminpage.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/path-converter/src/NoConverter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/minify/src/JS.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/minify/src/Exceptions/BasicException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/path-converter/src/Converter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/advanced-wpperformance/Classes/Libs/minify/src/Exceptions/IOException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'nicomartin\\CriticalAPI\\Init' not found in wp-content/plugins/advanced-wpperformance/Classes/critical-api/class-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: pagespeed, scriptloading, critical css api, optimize, preload...

advanced-wpperformance/advanced-wpperformance.php 92% from 13 tests

Analyzing the main PHP file in "Advanced WPPerformance" version 1.6.2
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin5,036 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP288231,1413,114
CSS4310957
JavaScript8149161543
PO File2104122362
Markdown11055
JSON1003
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.04
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes23
▷ Abstract classes313.04%
▷ Concrete classes2086.96%
▷ Final classes00.00%
Methods186
▷ Static methods21.08%
▷ Public methods13472.04%
▷ Protected methods4423.66%
▷ Private methods84.30%
Functions25
▷ Named functions1248.00%
▷ Anonymous functions1352.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin