88% wh-tweaks

Code Review | WH Tweaks

WordPress plugin WH Tweaks scored 88% from 54 tests.

About plugin

  • Plugin page: wh-tweaks
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.8.1
  • First release: Jul 6, 2016
  • Latest release: May 17, 2021
  • Number of updates: 41
  • Update frequency: every 43.3 days
  • Top authors: webheadllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,152 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼140.73ms] Passed 4 tests

An overview of server-side resources used by WH Tweaks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1330.19 ▲6.47
Dashboard /wp-admin3.08 ▲0.0340.61 ▲0.38
Posts /wp-admin/edit.php3.14 ▲0.0343.54 ▲4.61
Add New Post /wp-admin/post-new.php5.45 ▲0.0279.01 ▼565.39
Media Library /wp-admin/upload.php3.03 ▲0.0331.22 ▼2.51
WH Tweaks /wp-admin/options-general.php?page=wht-options3.0329.71

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WH Tweaks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,599 ▲315.81 ▲0.302.34 ▼8.1750.70 ▲2.97
Dashboard /wp-admin2,975 ▲385.85 ▼0.13136.15 ▼6.79109.82 ▼5.43
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0266.86 ▼0.6994.47 ▼3.12
Add New Post /wp-admin/post-new.php1,879 ▲26417.13 ▼4.36353.10 ▲83.74108.27 ▲3.05
Media Library /wp-admin/upload.php1,812 ▲55.01 ▲0.00135.06 ▼13.47116.44 ▼5.35
WH Tweaks /wp-admin/options-general.php?page=wht-options2,3424.3694.53122.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wh-tweaks/options-page.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wh-tweaks/wh-tweaks.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
You can look at the official readme.txt

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

This is the main PHP file of "WH Tweaks" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Common functionality WordPress core should have but maybe shouldn't.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,132 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP7108183828
JavaScript22660186
CSS5222118

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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