90% disable-settings-for-wp

Code Review | Disable Settings For WP

WordPress plugin Disable Settings For WP scored90%from 54 tests.

About plugin

  • Plugin page: disable-settings-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 10, 2023
  • Latest release: Nov 10, 2023
  • Number of updates: 7
  • Update frequency: every 4.7 days
  • Top authors: harshgajipara (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /68 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.61ms] Passed 4 tests

Server-side resources used by Disable Settings For WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.79 ▼2.10
Dashboard /wp-admin3.31 ▼0.0344.16 ▼16.27
Posts /wp-admin/edit.php3.36 ▲0.0144.56 ▲0.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.13 ▼8.25
Media Library /wp-admin/upload.php3.24 ▲0.0137.33 ▲7.76
Disable Settings /wp-admin/options-general.php?page=disable-settings3.2029.59

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Settings For WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.22 ▼0.501.60 ▼0.1936.89 ▼8.78
Dashboard /wp-admin2,196 ▲185.54 ▼0.2186.61 ▼28.6139.51 ▼5.04
Posts /wp-admin/edit.php2,104 ▲71.96 ▲0.0240.81 ▲2.9937.41 ▲4.25
Add New Post /wp-admin/post-new.php1,536 ▲724.91 ▲1.70680.13 ▲40.0280.73 ▲28.18
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.02102.15 ▲5.0844.36 ▲0.63
Disable Settings /wp-admin/options-general.php?page=disable-settings8441.9927.1923.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

disable-settings-for-wp/disable-settings-for-wp.php Passed 13 tests

The main PHP file in "Disable Settings For WP" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
102 characters long description:
A plugin for disabling various settings like right-click, REST API and Hide topbar panel in wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP293190

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected