10% all-in-one-performance-accelerator

Code Review | All-in-one Performance Accelerator

WordPress plugin All-in-one Performance Accelerator scored 10% from 54 tests.

About plugin

  • Plugin page: all-in-one-perfor...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.9.2
  • First release: Mar 10, 2021
  • Latest release: Mar 19, 2021
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 400 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/all-in-one-performance-accelerator/includes/smack_cache_disk.php+429
    file_put_contents(wp-content/settings/smack-cache/wp.com.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.76MB] [CPU: ▼335.43ms] Passed 4 tests

Server-side resources used by All-in-one Performance Accelerator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.12 ▲1.6122.30 ▼46.11
Dashboard /wp-admin5.14 ▲1.7320.52 ▼15.78
Posts /wp-admin/edit.php5.15 ▲1.5120.70 ▼18.23
Add New Post /wp-admin/post-new.php5.15 ▼1.8221.16 ▼1,261.58
Media Library /wp-admin/upload.php5.15 ▲1.8519.38 ▼6.51

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

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Illegal file modification found: 3 files (6.02KB) outside of "wp-content/plugins/all-in-one-performance-accelerator/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (modified) wp-config.php
    • (new file) wp-content/advanced-smack-cache.php
Filesystem: 273 new files
Database: no new tables, 1 new option
New WordPress options
smack_cache_enhancer

Browser metrics Passed 4 tests

Checking browser requirements for All-in-one Performance Accelerator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,865 ▲11115.69 ▼0.055.79 ▼0.862.86 ▼0.46
Dashboard /wp-admin2,948 ▲955.87 ▼0.29118.97 ▼6.17177.62 ▲16.54
Posts /wp-admin/edit.php2,735 ▲412.85 ▼0.3857.29 ▼8.44142.10 ▼5.18
Add New Post /wp-admin/post-new.php1,677 ▼4020.56 ▼0.63399.56 ▼53.03154.39 ▼6.99
Media Library /wp-admin/upload.php1,747 ▲495.48 ▼0.06127.64 ▼34.22212.40 ▲17.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/all-in-one-performance-accelerator/all-in-one-performance-accelerator.php+85
    Undefined index: action

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 54× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/matthiasmullie/minify/src/JS.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/all-in-one-performance-accelerator/vendor/matthiasmullie/path-converter/src/NoConverter.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/all-in-one-performance-accelerator/classes/Gzip-compression.php on line 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 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 require attention:
  • Screenshots: Add images for these screenshots: #1 (Site informations.), #2 (site status.), #3 (File Optimization.), #4 (Media Section.), #5 (Database Optimization.), #6 (Preload), #7 (Image Optimization.), #8 (Cache), #9 (Advanced Rules), #10 (Tools)
The official readme.txt is a good inspiration

all-in-one-performance-accelerator/all-in-one-performance-accelerator.php 92% from 13 tests

The main PHP script in "All-in-one Performance Accelerator" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin31,501 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
PHP1625,7669,96624,790
Markdown161,08403,375
CSS52601161,935
JSON12001,053
JavaScript434225287
YAML10031
Dockerfile210021
make1409

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.44
Average class complexity27.27
▷ Minimum class complexity1.00
▷ Maximum class complexity259.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces17
Interfaces16
Traits2
Classes121
▷ Abstract classes43.31%
▷ Concrete classes11796.69%
▷ Final classes1613.68%
Methods1,421
▷ Static methods33823.79%
▷ Public methods1,12679.24%
▷ Protected methods835.84%
▷ Private methods21214.92%
Functions225
▷ Named functions11249.78%
▷ Anonymous functions11350.22%
Constants144
▷ Global constants6645.83%
▷ Class constants7854.17%
▷ Public constants78100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
43 PNG files occupy 1.42MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/file/application.png0.45KB0.52KB0.00%
assets/css/images/formula.png0.84KB1.00KB0.00%
assets/css/images/file/old/folder_open.png0.57KB0.60KB0.00%
screenshot-2.png181.29KB47.10KB▼ 74.02%
screenshot-4.png76.32KB20.89KB▼ 72.63%