88% advanced-settings

Code Review | Advanced Settings

WordPress plugin Advanced Settings scored 88% from 54 tests.

About plugin

  • Plugin page: advanced-settings
  • Plugin version: 2.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5.3
  • WordPress version: 5.9.2
  • First release: Jul 9, 2012
  • Latest release: Dec 2, 2020
  • Number of updates: 39
  • Update frequency: every 78.7 days
  • Top authors: webarthur (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active / 26,225 total downloads

Benchmarks

Plugin footprint Passed 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.13MB] [CPU: ▼288.23ms] Passed 4 tests

An overview of server-side resources used by Advanced Settings
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2164.58 ▲9.11
Dashboard /wp-admin3.57 ▲0.1645.22 ▲4.71
Posts /wp-admin/edit.php3.80 ▲0.1649.92 ▼0.05
Add New Post /wp-admin/post-new.php7.04 ▲0.0699.29 ▼1,160.90
Media Library /wp-admin/upload.php3.45 ▲0.1535.07 ▲3.31
Post Types /wp-admin/options-general.php?page=post-types3.4830.31
Styles /wp-admin/options-general.php?page=advanced-settings-styles3.4331.98
HTML Code /wp-admin/options-general.php?page=advanced-settings-code3.4426.49
Scripts /wp-admin/options-general.php?page=advanced-settings-scripts3.4326.20
System /wp-admin/options-general.php?page=advanced-settings-system3.4431.55
Filters/Actions /wp-admin/options-general.php?page=advanced-settings-filters3.4235.72

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics 75% from 4 tests

An overview of browser requirements for Advanced Settings
Please improve the following
  • Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 25,069 on /wp-admin/options-general.php?page=advanced-settings-filters)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲7116.01 ▲0.326.19 ▲0.172.37 ▼0.46
Dashboard /wp-admin2,920 ▲596.17 ▲0.10128.53 ▼10.46177.48 ▲14.44
Posts /wp-admin/edit.php2,719 ▲283.23 ▼0.0065.53 ▲0.84138.65 ▼6.41
Add New Post /wp-admin/post-new.php1,770 ▲10921.33 ▲5.55464.89 ▲28.17157.66 ▲0.15
Media Library /wp-admin/upload.php1,728 ▲305.50 ▲0.01147.82 ▲1.38187.42 ▲4.40
Post Types /wp-admin/options-general.php?page=post-types1,9842.7354.99169.70
Styles /wp-admin/options-general.php?page=advanced-settings-styles1,1222.3854.77186.43
HTML Code /wp-admin/options-general.php?page=advanced-settings-code1,3982.3954.05181.90
Scripts /wp-admin/options-general.php?page=advanced-settings-scripts1,1862.5154.35177.55
System /wp-admin/options-general.php?page=advanced-settings-system1,3132.3855.20179.88
Filters/Actions /wp-admin/options-general.php?page=advanced-settings-filters25,0694.0184.70261.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin_area() in wp-content/plugins/advanced-settings/actions-scripts.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin_area() in wp-content/plugins/advanced-settings/actions-styles.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-settings/index.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=advanced-settings-filters
    • > Network (severe)
    https://ronconi.dev/favicon.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 30 tag instead of maximum 10
You can look at the official readme.txt

advanced-settings/index.php 92% from 13 tests

The main PHP script in "Advanced Settings" version 2.3.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-settings.php" instead of "index.php")

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 plugin1,727 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP104083801,727

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions72
▷ Named functions5981.94%
▷ Anonymous functions1318.06%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected