78% advanced-settings

Code Review | Advanced Settings

WordPress plugin Advanced Settings scored78%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: 6.3.1
  • 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

300+ active /27,373 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.46ms] Passed 4 tests

Server-side resources used by Advanced Settings
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1637.05 ▼2.53
Dashboard /wp-admin3.46 ▲0.1648.90 ▲0.49
Posts /wp-admin/edit.php3.58 ▲0.2251.74 ▲6.24
Add New Post /wp-admin/post-new.php6.04 ▲0.1596.26 ▼1.07
Media Library /wp-admin/upload.php3.39 ▲0.1535.66 ▲1.29
Styles /wp-admin/options-general.php?page=advanced-settings-styles3.3635.19
System /wp-admin/options-general.php?page=advanced-settings-system3.3733.95
Post Types /wp-admin/options-general.php?page=post-types3.4132.74
Filters/Actions /wp-admin/options-general.php?page=advanced-settings-filters3.3537.48
HTML Code /wp-admin/options-general.php?page=advanced-settings-code3.3733.35
Scripts /wp-admin/options-general.php?page=advanced-settings-scripts3.3632.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Advanced Settings: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲5313.30 ▼1.074.78 ▲2.7541.97 ▼3.85
Dashboard /wp-admin2,230 ▲394.85 ▼0.05107.51 ▼6.7237.15 ▼10.10
Posts /wp-admin/edit.php2,113 ▲242.05 ▲0.0539.81 ▲0.4733.78 ▼0.43
Add New Post /wp-admin/post-new.php1,537 ▼623.16 ▲5.03668.58 ▲30.1360.36 ▲12.44
Media Library /wp-admin/upload.php1,412 ▲274.13 ▼0.05112.20 ▲8.9947.34 ▲6.26
Styles /wp-admin/options-general.php?page=advanced-settings-styles8762.0224.5149.36
System /wp-admin/options-general.php?page=advanced-settings-system9862.0428.2037.67
Post Types /wp-admin/options-general.php?page=post-types1,4181.7225.6336.67
Filters/Actions /wp-admin/options-general.php?page=advanced-settings-filters19,3982.7843.39119.61
HTML Code /wp-admin/options-general.php?page=advanced-settings-code1,0542.0423.4239.42
Scripts /wp-admin/options-general.php?page=advanced-settings-scripts9212.0228.9546.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 | 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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-settings/index.php:28
    • > 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_area() in wp-content/plugins/advanced-settings/actions-scripts.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=advanced-settings-scripts
    • > 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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (30 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

This is the main PHP file of "Advanced Settings" version 2.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-settings.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,727 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP104083801,727

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin