78% webtexttool

Code Review | Textmetrics

WordPress plugin Textmetrics scored78%from 54 tests.

About plugin

  • Plugin page: webtexttool
  • Plugin version: 3.5.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 19, 2016
  • Latest release: Sep 27, 2023
  • Number of updates: 161
  • Update frequency: every 16.9 days
  • Top authors: israpil (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active /67,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.73MB] [CPU: ▲2.81ms] Passed 4 tests

An overview of server-side resources used by Textmetrics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7140.41 ▼3.24
Dashboard /wp-admin4.03 ▲0.7351.64 ▲3.01
Posts /wp-admin/edit.php4.09 ▲0.7349.94 ▲6.25
Add New Post /wp-admin/post-new.php7.08 ▲1.20148.13 ▲55.73
Media Library /wp-admin/upload.php3.96 ▲0.7338.07 ▲5.21
Dashboard /wp-admin/admin.php?page=wtt_dashboard4.1941.56
Social /wp-admin/admin.php?page=wtt_social3.9639.92
Settings /wp-admin/admin.php?page=wtt_settings3.8938.02
Tools /wp-admin/admin.php?page=wtt_tools3.9136.14

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 80 new files
Database: no new tables, 10 new options
New WordPress options
wtt_options
widget_recent-comments
widget_theysaidso_widget
wtt_social
db_upgraded
can_compress_scripts
theysaidso_admin_options
wtt_settings
wtt_version
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Textmetrics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.35 ▼0.851.58 ▼0.3637.50 ▼9.99
Dashboard /wp-admin2,251 ▲634.94 ▼0.8798.51 ▼19.7086.82 ▲40.64
Posts /wp-admin/edit.php2,167 ▲782.02 ▼0.0241.13 ▲3.9740.41 ▲4.40
Add New Post /wp-admin/post-new.php9,701 ▲8,18225.66 ▲2.471,059.31 ▲399.06193.50 ▲145.60
Media Library /wp-admin/upload.php1,433 ▲424.13 ▼0.1396.04 ▼0.6782.20 ▲38.53
Dashboard /wp-admin/admin.php?page=wtt_dashboard1,3643.0582.1075.33
Social /wp-admin/admin.php?page=wtt_social2,1783.0943.4679.19
Settings /wp-admin/admin.php?page=wtt_settings1,5381.8027.7533.41
Tools /wp-admin/admin.php?page=wtt_tools9352.0225.0428.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • wtt_settings
    • theysaidso_admin_options
    • wtt_social
    • widget_theysaidso_widget
    • wtt_version
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • wtt_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/webtexttool/core/partials/WTT_BlockSettings.php
    • > /wp-content/plugins/webtexttool/core/partials/WTT_BlockSuggestions.php
    • > /wp-content/plugins/webtexttool/core/partials/directives/wtt-content-quality.php
    • > /wp-content/plugins/webtexttool/core/partials/directives/wtt-suggestions-category.php
    • > /wp-content/plugins/webtexttool/core/partials/directives/wtt-page-slideout.php
  • 31× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/webtexttool/core/partials/WTT_BlockResearch.php:3
    • > PHP Notice
      Undefined variable: wttform in wp-content/plugins/webtexttool/admin/partials/social/wtt-social-schema.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/webtexttool/admin/partials/social/wtt-social-languages.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/webtexttool/admin/partials/dashboard/wtt-account.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function switch_field() on null in wp-content/plugins/webtexttool/admin/partials/social/wtt-social-options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/webtexttool/admin/partials/dashboard/wtt-admin-display.php:16
    • > PHP Notice
      Undefined variable: wttform in wp-content/plugins/webtexttool/admin/partials/social/wtt-social-accounts.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/webtexttool/core/partials/WTT_Social.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function text_input_field() on null in wp-content/plugins/webtexttool/admin/partials/social/wtt-social-accounts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function switch_field() on null in wp-content/plugins/webtexttool/admin/partials/settings/wtt-rwmb-settings.php:3

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

webtexttool/webtexttool.php 92% from 13 tests

"Textmetrics" version 3.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 145 characters long)

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
Good job! No executable or dangerous file extensions detected5,709 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,0101,1095,015
SVG100288
JavaScript149487283
HTML230106
CSS80017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity92.71
▷ Minimum class complexity1.00
▷ Maximum class complexity309.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods174
▷ Static methods137.47%
▷ Public methods8850.57%
▷ Protected methods63.45%
▷ Private methods8045.98%
Functions27
▷ Named functions27100.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
6 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/tm_loading_template.png5.39KB3.85KB▼ 28.56%
core/images/tm_logo.png5.39KB3.85KB▼ 28.56%
core/images/question-mark.png0.37KB0.29KB▼ 23.16%
admin/images/tm_logo_16.png0.78KB0.56KB▼ 27.93%
core/images/flags.png78.01KB25.86KB▼ 66.85%