77% whatsthis-tooltip

Code Review | Whats This

WordPress plugin Whats This scored 77% from 54 tests.

About plugin

  • Plugin page: whatsthis-tooltip
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jan 31, 2012
  • Latest release: Nov 28, 2012
  • Number of updates: 37
  • Update frequency: every 8.2 days
  • Top authors: nuvuscripts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,284 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Whats This
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1544.44 ▲21.26
Dashboard /wp-admin3.10 ▲0.0444.21 ▲1.73
Posts /wp-admin/edit.php3.15 ▲0.0447.26 ▲1.81
Add New Post /wp-admin/post-new.php5.45 ▲0.0291.78 ▼567.94
Media Library /wp-admin/upload.php3.04 ▲0.0432.66 ▼0.18
WhatsThis Settings /wp-admin/options-general.php?page=wtplugin2.9928.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
wt_options

Browser metrics Passed 4 tests

Checking browser requirements for Whats This
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲22716.32 ▲0.4612.08 ▲3.9548.23 ▼4.53
Dashboard /wp-admin2,975 ▲415.81 ▼0.17132.44 ▼13.74117.27 ▲7.92
Posts /wp-admin/edit.php2,744 ▲82.70 ▲0.0165.97 ▼0.9589.41 ▼4.41
Add New Post /wp-admin/post-new.php1,501 ▼18218.84 ▲0.13379.13 ▼0.28116.19 ▲5.82
Media Library /wp-admin/upload.php1,812 ▲25.03 ▼0.01153.44 ▼0.13119.85 ▲2.26
WhatsThis Settings /wp-admin/options-general.php?page=wtplugin1,3052.2167.6174.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • wt_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 errors were triggered by the plugin
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wtplugin
    • > Notice in wp-content/plugins/whatsthis-tooltip/whatsthis.php+158
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whatsthis-tooltip/whatsthis.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots require images: #1 (/trunk/screenshots/screenshot-1.png), #2 (/trunk/screenshots/screenshot-2.png), #3 (/trunk/screenshots/screenshot-3.png), #4 (/trunk/screenshots/screenshot-4.png), #5 (/trunk/screenshots/screenshot-5.png), #6 (/trunk/screenshots/screenshot-6.png)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === whatsthis-tooltip === )
The official readme.txt might help

whatsthis-tooltip/whatsthis.php 92% from 13 tests

The principal PHP file in "Whats This" v. 2.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("whatsthis-tooltip.php" instead of "whatsthis.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin515 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS13231284
PHP14324124
JavaScript17141107

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 2.73MB with 1.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-1.png20.47KB9.20KB▼ 55.05%
screenshots/screenshot-5.png617.29KB285.24KB▼ 53.79%
screenshots/screenshot-2.png104.41KB55.35KB▼ 46.98%
screenshots/screenshot-6.png658.82KB290.32KB▼ 55.93%
screenshots/screenshot-3.png819.82KB371.46KB▼ 54.69%