78% text-case-converter

Code Review | Text Case Converter

WordPress plugin Text Case Converter scored78%from 54 tests.

About plugin

  • Plugin page: text-case-converter
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Nov 14, 2023
  • Number of updates: 28
  • Update frequency: every 51.8 days
  • Top authors: coder426 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /4,872 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
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.32ms] Passed 4 tests

Analyzing server-side resources used by Text Case Converter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1638.31 ▼2.51
Dashboard /wp-admin3.47 ▲0.1646.95 ▼3.45
Posts /wp-admin/edit.php3.52 ▲0.1645.68 ▼1.41
Add New Post /wp-admin/post-new.php6.07 ▲0.1883.45 ▼13.89
Media Library /wp-admin/upload.php3.39 ▲0.1637.75 ▲5.24
Text Case Converter /wp-admin/options-general.php?page=txtcc3.4333.18

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 113 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
_txtcc_all_settings
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Text Case Converter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲15915.52 ▲1.185.54 ▲3.9139.58 ▼4.18
Dashboard /wp-admin2,241 ▲706.64 ▲1.05111.49 ▲8.3539.41 ▼7.79
Posts /wp-admin/edit.php2,148 ▲483.46 ▲1.5348.73 ▲9.7444.01 ▲8.39
Add New Post /wp-admin/post-new.php1,721 ▲19522.86 ▼0.22645.95 ▼9.4934.11 ▼30.40
Media Library /wp-admin/upload.php1,452 ▲495.07 ▲0.98121.44 ▲15.8243.21 ▲0.19
Text Case Converter /wp-admin/options-general.php?page=txtcc2,32210.58357.83102.59

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • _txtcc_all_settings
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=txtcc
    • > Warning in wp-content/plugins/text-case-converter/include/txtccsetting.php+227
    include(wp-content/plugins/text-case-converter/include/txtcc_setting_support_html.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=txtcc
    • > Warning in wp-content/plugins/text-case-converter/include/txtccsetting.php+227
    include(): Failed opening 'wp-content/plugins/text-case-converter/include/txtcc_setting_support_html.php' for inclusion (include_path='.:/usr/share/php')

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/text-case-converter/include/txtcc_inscript.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-case-converter/include/functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/text-case-converter/include/txtccsetting.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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:
  • Screenshots: Please add images for these screenshots: #1 (Plugin activation Page), #2 (Block Editor View)
The official readme.txt might help

text-case-converter/txtcc.php 85% from 13 tests

The main PHP script in "Text Case Converter" version 1.4.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("text-case-converter.php" instead of "txtcc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected16,279 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,3111,90213,369
PO File111,1711,4462,310
PHP42327423
CSS71420175
SVG1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.82
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
46 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/icons/4.png0.84KB0.71KB▼ 15.60%
assets/js/icons/S3.png3.06KB0.22KB▼ 92.79%
assets/js/icons/video.png0.63KB0.59KB▼ 5.62%
assets/js/icons/cc.png0.37KB0.45KB0.00%
assets/js/icons/insert.png0.51KB0.33KB▼ 34.36%