84% keyword-to-tooltip-lite

Code Review | Keyword to Tooltip Lite

WordPress plugin Keyword to Tooltip Lite scored84%from 54 tests.

About plugin

  • Plugin page: keyword-to-toolti...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Aug 1, 2014
  • Latest release: Aug 2, 2014
  • Number of updates: 31
  • Update frequency: every 0.0 days
  • Top authors: rusuandreirobert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.19ms] Passed 4 tests

An overview of server-side resources used by Keyword to Tooltip Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.67 ▼2.56
Dashboard /wp-admin3.43 ▲0.1347.11 ▼4.83
Posts /wp-admin/edit.php3.54 ▲0.1949.81 ▼1.10
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.16 ▼4.27
Media Library /wp-admin/upload.php3.35 ▲0.1241.06 ▲8.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: 1 new table, 6 new options
New tables
wp_keyword_to_tooltip_lite_keyword
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Keyword to Tooltip Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲19313.88 ▼0.735.63 ▲3.7940.73 ▼3.05
Dashboard /wp-admin2,228 ▲545.27 ▲0.31104.87 ▼2.3593.40 ▲50.75
Posts /wp-admin/edit.php2,128 ▲532.39 ▲0.3440.76 ▲1.0537.52 ▲2.72
Add New Post /wp-admin/post-new.php1,702 ▲16922.80 ▼0.33784.16 ▲103.5336.34 ▼21.42
Media Library /wp-admin/upload.php1,428 ▲464.67 ▲0.49101.26 ▼3.1577.44 ▲33.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'panel_color' of non-object in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_edit.php on line 16
    • > PHP Notice
      Trying to get property 'highlight_color' of non-object in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_view.php on line 28
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_edit.php on line 10
    • > PHP Notice
      Undefined variable: keyword in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_view.php on line 40
    • > PHP Notice
      Trying to get property 'keyword' of non-object in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_edit.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'KeywordToTooltipLite' not found in wp-content/plugins/keyword-to-tooltip-lite/_header.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'KeywordToTooltipLite' not found in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_view.php:46
    • > PHP Notice
      Undefined variable: keyword in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_edit.php on line 16
    • > PHP Notice
      Undefined variable: keyword in wp-content/plugins/keyword-to-tooltip-lite/views/_admin_keyword_edit.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'KeywordToTooltipLite' not found in wp-content/plugins/keyword-to-tooltip-lite/views/admin-settings.php:3

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === keyword-to-tooltip-lite === )
You can take inspiration from this readme.txt

keyword-to-tooltip-lite/keyword-to-tooltip-lite.php Passed 13 tests

The main PHP file in "Keyword to Tooltip Lite" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
60 characters long description:
Create any keyword you want, and assign a description to it.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected7,350 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS32416,074
PHP1523176937
SVG100228
JavaScript3326111

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.17
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods56
▷ Static methods23.57%
▷ Public methods4376.79%
▷ Protected methods00.00%
▷ Private methods1323.21%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png21.34KB0.49KB▼ 97.72%