10% ithoughts-tooltip-glossary

Code Review | iThoughts Tooltip Glossary

WordPress plugin iThoughts Tooltip Glossary scored10%from 54 tests.

About plugin

  • Plugin page: ithoughts-tooltip...
  • Plugin version: 3.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.5
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: May 15, 2018
  • Number of updates: 104
  • Update frequency: every 9.0 days
  • Top authors: Gerkin (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

50+ active /9,738 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Compile error in wp-content/plugins/ithoughts-tooltip-glossary/class/class-backbone.php+37
    Declaration of ithoughts\tooltip_glossary\Backbone::__construct($plugin_base) must be compatible with ithoughts\v1_0\Singleton::__construct()

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.87ms] Passed 4 tests

An overview of server-side resources used by iThoughts Tooltip Glossary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.17 ▼3.27
Dashboard /wp-admin3.31 ▲0.0050.45 ▼1.33
Posts /wp-admin/edit.php3.36 ▲0.0050.07 ▼2.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.27 ▼12.65
Media Library /wp-admin/upload.php3.23 ▲0.0038.40 ▲0.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 195 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for iThoughts Tooltip Glossary
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.261.71 ▲0.0142.21 ▼1.70
Dashboard /wp-admin2,203 ▲125.83 ▼0.07104.06 ▼0.2743.09 ▼1.09
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0333.73 ▼1.7638.09 ▲2.60
Add New Post /wp-admin/post-new.php1,537 ▲2323.26 ▲5.79658.98 ▲42.0458.64 ▲1.19
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0196.35 ▼7.7745.87 ▲0.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/tests/ApiTest.php:5
    • > PHP Warning
      array_shift() expects parameter 1 to be array, null given in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/tests/sort.php on line 10
    • > PHP Fatal error
      Uncaught Exception: nothing to parse in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/lessc.inc.php:2021
    • > PHP Warning
      array_shift() expects parameter 1 to be array, null given in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/tests/sort.php on line 8
    • > PHP Warning
      Declaration of lessify::parse($str = NULL) should be compatible with lessc::parse($str = NULL, $initialVariables = NULL) in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/lessify.inc.php on line 366
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/tests/InputTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ithoughts-tooltip-glossary/submodules/lessphp/tests/ErrorHandlingTest.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 36 tag instead of maximum 10
You can look at the official readme.txt

ithoughts-tooltip-glossary/ithoughts_tooltip_glossary.php 92% from 13 tests

"iThoughts Tooltip Glossary" version 3.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ithoughts-tooltip-glossary.php" instead of "ithoughts_tooltip_glossary.php")

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
There were no executable files found in this plugin19,726 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
PHP361,4972,1808,275
JavaScript359951,5805,982
CSS40117931,768
PO File35648071,548
LESS37474561,529
JSON400230
SVG411226
Markdown344087
Bourne Shell219153
XML30023
make1304
YAML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity37.67
▷ Minimum class complexity1.00
▷ Maximum class complexity370.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes39
▷ Abstract classes615.38%
▷ Concrete classes3384.62%
▷ Final classes00.00%
Methods413
▷ Static methods337.99%
▷ Public methods24258.60%
▷ Protected methods14835.84%
▷ Private methods235.57%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ext/tinymce/icon/glossaryterm-d.png0.70KB0.52KB▼ 25.21%
ext/tinymce/icon/glossaryindex.png0.98KB1.01KB0.00%
ext/tinymce/icon/glossaryterm.png0.44KB0.39KB▼ 11.75%