79% tweak-option

Code Review | Tweak Option

WordPress plugin Tweak Option scored79%from 54 tests.

About plugin

  • Plugin page: tweak-option
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2012
  • Latest release: Mar 14, 2023
  • Number of updates: 35
  • Update frequency: every 108.7 days
  • Top authors: opajaap (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /3,835 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.04MB] [CPU: ▼8.84ms] Passed 4 tests

Server-side resources used by Tweak Option
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.65 ▼6.43
Dashboard /wp-admin3.35 ▲0.0441.86 ▼9.54
Posts /wp-admin/edit.php3.40 ▲0.0449.00 ▲3.06
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.91 ▼22.43
Media Library /wp-admin/upload.php3.27 ▲0.0440.06 ▲3.10
Tweak Option /wp-admin/tools.php?page=tweak_option8.70158.78

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 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

An overview of browser requirements for Tweak Option
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.72 ▲0.361.53 ▼0.4937.57 ▼6.38
Dashboard /wp-admin2,206 ▲295.62 ▼0.0599.87 ▲5.7742.14 ▼5.47
Posts /wp-admin/edit.php2,108 ▲52.03 ▲0.0439.29 ▲2.1437.78 ▲0.81
Add New Post /wp-admin/post-new.php1,535 ▲723.01 ▼0.15680.04 ▲14.5752.49 ▼6.71
Media Library /wp-admin/upload.php1,408 ▲84.19 ▲0.0198.17 ▼1.9242.07 ▼2.40
Tweak Option /wp-admin/tools.php?page=tweak_option5,6134.1730.4058.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=tweak_option
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tweak-option/tweak-option.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: developer, tweak, options

tweak-option/tweak-option.php Passed 13 tests

The main file in "Tweak Option" v. 1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
28 characters long description:
Easily manage any WP option.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin255 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13018255

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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

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