78% wp-smart-tool-tip

Code Review | WP Smart Tooltip

WordPress plugin WP Smart Tooltip scored78%from 54 tests.

About plugin

  • Plugin page: wp-smart-tool-tip
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2018
  • Latest release: Apr 19, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: naminbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /709 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.08ms] Passed 4 tests

An overview of server-side resources used by WP Smart Tooltip
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0128.15 ▼13.93
Dashboard /wp-admin3.38 ▲0.0851.97 ▲2.38
Posts /wp-admin/edit.php3.49 ▲0.1451.69 ▲2.46
Add New Post /wp-admin/post-new.php5.98 ▲0.1091.73 ▼11.23
Media Library /wp-admin/upload.php3.30 ▲0.0838.65 ▲2.61
Setting /wp-admin/edit.php?post_type=wpsmart-tooltip&page=global_settings3.2733.08
WP Smrat Tooltip /wp-admin/edit.php?post_type=wpsmart-tooltip3.3541.35
Add New /wp-admin/post-new.php?post_type=wpsmart-tooltip3.4250.25
How to Use /wp-admin/edit.php?post_type=wpsmart-tooltip&page=how_to_use3.2736.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Smart Tooltip
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲23714.12 ▼0.468.48 ▲6.7245.23 ▲6.77
Dashboard /wp-admin2,280 ▲735.09 ▲0.18107.35 ▲0.3840.95 ▲0.66
Posts /wp-admin/edit.php2,158 ▲582.30 ▲0.2735.95 ▼4.6732.43 ▼5.77
Add New Post /wp-admin/post-new.php1,576 ▲5023.24 ▲5.54681.35 ▲39.3237.18 ▼9.05
Media Library /wp-admin/upload.php1,453 ▲564.48 ▲0.31100.24 ▼0.7349.04 ▲3.24
Setting /wp-admin/edit.php?post_type=wpsmart-tooltip&page=global_settings1,1672.2344.0526.86
WP Smrat Tooltip /wp-admin/edit.php?post_type=wpsmart-tooltip1,1302.2634.4432.47
Add New /wp-admin/post-new.php?post_type=wpsmart-tooltip2,2077.69164.5961.06
How to Use /wp-admin/edit.php?post_type=wpsmart-tooltip&page=how_to_use8771.9628.8031.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpsmart-tooltip&page=global_settings
    • > Notice in wp-content/plugins/wp-smart-tool-tip/view/settings.php+37
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-smart-tool-tip/view/how_to_use.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-smart-tool-tip/view/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-tool-tip/wp-smart-tooltip.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: bootstrap tooltip, responsive, tooltip, dictionary, tips...

wp-smart-tool-tip/wp-smart-tooltip.php 77% from 13 tests

The main PHP file in "WP Smart Tooltip" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-smart-tool-tip.php" instead of "wp-smart-tooltip.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected358 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP47621273
CSS26156
JavaScript27129

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.29MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png41.49KB9.46KB▼ 77.19%
assets/screenshot-1.png67.79KB17.78KB▼ 73.77%
assets/screenshot-2.png64.21KB17.69KB▼ 72.46%
assets/screenshot-4.png122.29KB35.26KB▼ 71.17%