10% seraphinite-accelerator

Code Review | Seraphinite Accelerator

WordPress plugin Seraphinite Accelerator scored10%from 54 tests.

About plugin

  • Plugin page: seraphinite-accel...
  • Plugin version: 2.20.36
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: May 29, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 265
  • Update frequency: every 3.5 days
  • Top authors: seraphinitesoft (100%)

Code review

54 tests

User reviews

199 reviews

Install metrics

20,000+ active /166,624 total downloads

Benchmarks

Plugin footprint 56% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/seraphinite-accelerator/Cmn/Gen.php+792
    fopen(wp-content/cache/seraphinite-accelerator/at): failed to open stream: No such file or directory

Server metrics [RAM: ▲6.72MB] [CPU: ▲23.98ms] 50% from 4 tests

Analyzing server-side resources used by Seraphinite Accelerator
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.70MB on /wp-admin/admin.php?page=seraph_accel_settings)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 6.72MB on /wp-admin/admin.php?page=seraph_accel_settings)
PageMemory (MB)CPU Time (ms)
Home /9.58 ▲6.1265.10 ▲24.41
Dashboard /wp-admin10.00 ▲6.6679.39 ▲14.89
Posts /wp-admin/edit.php10.39 ▲7.0378.38 ▲26.97
Add New Post /wp-admin/post-new.php12.95 ▲7.07129.10 ▲29.66
Media Library /wp-admin/upload.php10.33 ▲7.1076.85 ▲42.40
Manager /wp-admin/admin.php?page=seraph_accel_manage10.3066.36
Settings /wp-admin/admin.php?page=seraph_accel_settings10.7093.62

Server storage [IO: ▲1.71MB] [DB: ▲0.05MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • You have illegally modified 14 files (46.74KB) outside of "wp-content/plugins/seraphinite-accelerator/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (modified) wp-config.php
    • (new file) wp-content/cache/seraphinite-accelerator/at
    • (new file) wp-content/cache/seraphinite-accelerator/at.m
    • (new file) wp-content/advanced-cache.php
    • (new file) seraphinite-accelerator-2023-11-25_080931.htaccess
    • (new file) seraph-accel-img-compr-redir.conf
    • (new file) wp-content/cache/seraphinite-accelerator/pl
    • (new file) wp-content/cache/seraphinite-accelerator/dl
    • (new file) wp-content/cache/seraphinite-accelerator/q/m/l
    • ...
Filesystem: 121 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
seraph_accel_Sett
can_compress_scripts
widget_theysaidso_widget
seraph_accel_State
theysaidso_admin_options
seraph_accel_Data
seraph_accel_RmtCfg
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Seraphinite Accelerator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8114.24 ▼0.001.30 ▼0.4936.97 ▼7.90
Dashboard /wp-admin2,251 ▲745.68 ▲0.0097.01 ▼2.5382.15 ▲34.67
Posts /wp-admin/edit.php2,134 ▲341.97 ▲0.0238.29 ▼1.5034.37 ▼2.86
Add New Post /wp-admin/post-new.php1,703 ▲17621.54 ▼1.91756.19 ▲98.5657.88 ▲10.98
Media Library /wp-admin/upload.php1,428 ▲314.04 ▼0.1598.82 ▼5.8064.77 ▲20.64
Manager /wp-admin/admin.php?page=seraph_accel_manage1,5922.5754.4663.33
Settings /wp-admin/admin.php?page=seraph_accel_settings11,8503.86174.2068.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • seraph_accel_State
    • seraph_accel_RmtCfg
    • seraph_accel_Sett
    • seraph_accel_Data
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=seraph_accel_manage
    • > Warning in wp-content/plugins/seraphinite-accelerator/Cmn/Gen.php+792
    fopen(wp-content/cache/seraphinite-accelerator/s/m/up): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=seraph_accel_manage
    • > Warning in wp-content/plugins/seraphinite-accelerator/Cmn/Gen.php+792
    fopen(wp-content/cache/seraphinite-accelerator/uppq/m/l): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=seraph_accel_manage
    • > Warning in wp-content/plugins/seraphinite-accelerator/Cmn/Gen.php+792
    fopen(wp-content/cache/seraphinite-accelerator/upq/m/l): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=seraph_accel_manage
    • > Warning in wp-content/plugins/seraphinite-accelerator/Cmn/Gen.php+817
    fopen(wp-content/cache/seraphinite-accelerator/s/m/schu): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=seraph_accel_manage
    • > Warning in wp-content/plugins/seraphinite-accelerator/Cmn/Gen.php+817
    fopen(wp-content/cache/seraphinite-accelerator/s/m/cln): failed to open stream: No such file or directory

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 43× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/OptionsProcessor.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/CreateDefinitionProcessor.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/PartitionOptionsProcessor.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/WithProcessor.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/RenameProcessor.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\FromProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/UpdateProcessor.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/PartitionDefinitionProcessor.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\ExplainProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/DescribeProcessor.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/SubpartitionDefinitionProcessor.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'seraph_accel\\PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/seraphinite-accelerator/Cmn/Ext/PHP/PHPSQLParser/processors/ExplainProcessor.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: performance, speed up, cache, optimize, pagespeed

seraphinite-accelerator/plugin_root.php 92% from 13 tests

The principal PHP file in "Seraphinite Accelerator" v. 2.20.36 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("seraphinite-accelerator.php" instead of "plugin_root.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected28,116 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PHP826,4495,25526,767
JavaScript11193111899
HTML100444
JSON4004
CSS2002

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 160)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity37.36
▷ Minimum class complexity1.00
▷ Maximum class complexity361.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity160.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes97
▷ Abstract classes11.03%
▷ Concrete classes9698.97%
▷ Final classes11.04%
Methods908
▷ Static methods58264.10%
▷ Public methods67474.23%
▷ Protected methods13214.54%
▷ Private methods10211.23%
Functions429
▷ Named functions23755.24%
▷ Anonymous functions19244.76%
Constants218
▷ Global constants20.92%
▷ Class constants21699.08%
▷ Public constants216100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/VendorLogo.png1.47KB1.45KB▼ 1.40%
icon.png0.26KB0.26KB0.00%
Images/Test.png0.07KB0.09KB0.00%
Images/ProductLogo.png3.23KB2.18KB▼ 32.36%