94% site-settings

Code Review | Site Settings

WordPress plugin Site Settings scored 94% from 54 tests.

About plugin

  • Plugin page: site-settings
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5.3
  • WordPress version: 5.8.1
  • First release: Feb 12, 2015
  • Latest release: Jul 26, 2016
  • Number of updates: 5
  • Update frequency: every 106.0 days
  • Top authors: husobj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 997 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.00ms] Passed 4 tests

An overview of server-side resources used by Site Settings
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1245.47 ▲18.57
Dashboard /wp-admin3.11 ▲0.0552.10 ▲4.11
Posts /wp-admin/edit.php3.16 ▲0.0544.97 ▼0.62
Add New Post /wp-admin/post-new.php5.46 ▲0.0391.77 ▼569.91
Media Library /wp-admin/upload.php3.05 ▲0.0537.42 ▲2.43
Site Settings /wp-admin/options-general.php?page=site-settings3.0230.76

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Site Settings
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10215.85 ▲0.328.50 ▼1.5854.28 ▲9.94
Dashboard /wp-admin2,972 ▲385.93 ▼0.07143.98 ▼10.03127.41 ▲5.73
Posts /wp-admin/edit.php2,744 ▲52.74 ▲0.0266.17 ▼4.6992.94 ▼10.35
Add New Post /wp-admin/post-new.php1,503 ▼8818.61 ▲0.07376.17 ▼7.94121.25 ▼0.46
Media Library /wp-admin/upload.php1,812 ▲25.03 ▼0.07156.71 ▼6.41130.74 ▲4.40
Site Settings /wp-admin/options-general.php?page=site-settings1,0322.0557.1969.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/site-settings/includes/admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/site-settings/site-settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/site-settings/includes/admin/settings-screen.php:9

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: settings, admin

site-settings/site-settings.php Passed 13 tests

The entry point to "Site Settings" version 0.2 is a PHP file that has certain tags in its header comment area
54 characters long description:
Manage custom site settings and global content fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin228 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5149158228

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1878.26%
▷ Public methods1669.57%
▷ Protected methods00.00%
▷ Private methods730.43%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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