84% wp-tweaks

Code Review | WP Tweaks

WordPress plugin WP Tweaks scored84%from 54 tests.

About plugin

  • Plugin page: wp-tweaks
  • Plugin version: 2.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2018
  • Latest release: Nov 19, 2023
  • Number of updates: 30
  • Update frequency: every 66.8 days
  • Top authors: luizbills (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /9,077 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.60MB] [CPU: ▲5.80ms] Passed 4 tests

Analyzing server-side resources used by WP Tweaks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6254.87 ▲19.09
Dashboard /wp-admin3.90 ▲0.5954.56 ▲3.64
Posts /wp-admin/edit.php3.96 ▲0.6060.10 ▼3.10
Add New Post /wp-admin/post-new.php6.48 ▲0.6092.46 ▲3.57
Media Library /wp-admin/upload.php3.85 ▲0.6253.21 ▲22.00
Tweaks /wp-admin/options-general.php?page=wp-tweaks3.8851.45

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Tweaks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,220 ▼54214.20 ▼0.071.43 ▼0.2141.11 ▲0.94
Dashboard /wp-admin1,676 ▼4995.44 ▼0.1387.03 ▼23.1832.11 ▼10.44
Posts /wp-admin/edit.php2,002 ▼982.06 ▲0.0536.82 ▼6.5231.63 ▼4.70
Add New Post /wp-admin/post-new.php1,543 ▲1720.74 ▼1.87669.66 ▲60.6134.69 ▼30.88
Media Library /wp-admin/upload.php1,337 ▼664.08 ▼0.1098.87 ▼1.3942.19 ▼1.49
Tweaks /wp-admin/options-general.php?page=wp-tweaks2,6486.72146.1795.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 add_action() in wp-content/plugins/wp-tweaks/includes/tweaks/hide-admin-notices.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Tweaks\\Dependencies\\WP_Options_Page' not found in wp-content/plugins/wp-tweaks/classes/Settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-tweaks/includes/tweaks/disable-comments.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: security, tweaks, emoji, xmlrpc, performance...

wp-tweaks/wp-tweaks.php Passed 13 tests

The main PHP file in "WP Tweaks" ver. 2.3.0 adds more information about the plugin and also serves as the entry point for this plugin
73 characters long description:
Several opinionated WordPress tweaks focused in security and performance.

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
No dangerous file extensions were detected3,694 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP568001,1803,477
PO File17589184
JSON20032
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity41.33
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods160
▷ Static methods2817.50%
▷ Public methods8955.62%
▷ Protected methods6440.00%
▷ Private methods74.38%
Functions51
▷ Named functions4792.16%
▷ Anonymous functions47.84%
Constants7
▷ Global constants228.57%
▷ Class constants571.43%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin