84% text-styler

Code Review | Text Styler

WordPress plugin Text Styler scored84%from 54 tests.

About plugin

  • Plugin page: text-styler
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.5.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2016
  • Latest release: Nov 23, 2020
  • Number of updates: 39
  • Update frequency: every 41.2 days
  • Top authors: edesac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.82ms] Passed 4 tests

Analyzing server-side resources used by Text Styler
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1738.28 ▼5.40
Dashboard /wp-admin3.57 ▲0.2248.31 ▼6.38
Posts /wp-admin/edit.php3.62 ▲0.2649.61 ▲1.12
Add New Post /wp-admin/post-new.php6.08 ▲0.1989.20 ▼0.62
Media Library /wp-admin/upload.php3.40 ▲0.1737.37 ▲2.13

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Text Styler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,447 ▲70115.14 ▲0.771.68 ▼0.4839.82 ▼4.89
Dashboard /wp-admin2,847 ▲6626.78 ▲0.91146.12 ▲44.4331.14 ▼12.84
Posts /wp-admin/edit.php2,756 ▲6673.66 ▲1.6656.63 ▲20.4528.96 ▼2.63
Add New Post /wp-admin/post-new.php2,017 ▲48423.74 ▲0.71628.47 ▼63.0839.40 ▼14.58
Media Library /wp-admin/upload.php1,892 ▲5044.48 ▲0.3288.10 ▼18.1045.00 ▼1.33

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'TXST_MCEForm' not found in wp-content/plugins/text-styler/TXST/MCEForm/StyleOptions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-styler/TXST/MCEForm.php:54

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: tinymce add-on, advance tinymce, wp text styler, text styler, tinymce button...

text-styler/text-styler.php 92% from 13 tests

The entry point to "Text Styler" version 1.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 229 characters long)

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
There were no executable files found in this plugin1,484 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP317061793
CSS3914430
JavaScript37616261

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.00
▷ Minimum class complexity2.00
▷ Maximum class complexity87.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods46
▷ Static methods510.87%
▷ Public methods3473.91%
▷ Protected methods1226.09%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ts-mce-button.png0.59KB0.52KB▼ 13.01%