83% sites-settings

Code Review | Site-settings

WordPress plugin Site-settings scored 83% from 54 tests.

About plugin

  • Plugin page: sites-settings
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 4, 2021
  • Latest release: Jan 29, 2023
  • Number of updates: 15
  • Update frequency: every 46.5 days
  • Top authors: coderstime (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,218 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.55ms] Passed 4 tests

Server-side resources used by Site-settings
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.53 ▲3.89
Dashboard /wp-admin3.33 ▲0.0248.75 ▼0.61
Posts /wp-admin/edit.php3.38 ▲0.0242.42 ▼5.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.97 ▼19.81
Media Library /wp-admin/upload.php3.25 ▲0.0236.37 ▼0.41
Site Settings /wp-admin/options-general.php?page=site-settings3.3533.84

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-comments
site_instagram
site_phone
sitesettings_active
site_email
site_facebook
site_twitter
widget_recent-posts
site_logo
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Site-settings
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.24 ▼1.121.71 ▲0.2148.38 ▲5.05
Dashboard /wp-admin2,210 ▲195.86 ▲0.84111.47 ▲10.7943.39 ▲1.93
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0135.86 ▼0.0231.60 ▼2.26
Add New Post /wp-admin/post-new.php1,538 ▲423.39 ▲0.28658.96 ▼6.8957.40 ▲5.54
Media Library /wp-admin/upload.php1,432 ▲414.34 ▲0.0995.10 ▼7.8242.13 ▼7.91
Site Settings /wp-admin/options-general.php?page=site-settings1,3293.5752.8491.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 16 options in the database
    • site_logo
    • site_tags
    • site_email
    • sitesettings_deactive
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • site_facebook
    • site_phone
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=site-settings
    • > Notice in wp-content/plugins/sites-settings/settings-form.php+108
    Trying to get property 'labels' of non-object
    • > GET request to /wp-admin/options-general.php?page=site-settings
    • > Notice in wp-content/plugins/sites-settings/settings-form.php+108
    Trying to get property 'singular_name' of non-object
    • > GET request to /wp-admin/options-general.php?page=site-settings
    • > Warning in wp-content/plugins/sites-settings/settings-form.php+109
    count(): Parameter must be an array or an object that implements Countable
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=site-settings
    • > Notice in wp-content/plugins/sites-settings/settings-form.php+114
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=site-settings
    • > Notice in wp-content/plugins/sites-settings/settings-form.php+114
    Trying to get property 'name' of non-object

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

sites-settings/site-settings.php 85% from 13 tests

This is the main PHP file of "Site-settings" version 1.1.1, 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:
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sites-settings.php" instead of "site-settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,844 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,1252784,373
PHP211762429
CSS38842

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png20.54KB9.69KB▼ 52.85%