84% change-case-for-tinymce

Code Review | Change Text Case

WordPress plugin Change Text Case scored84%from 54 tests.

About plugin

  • Plugin page: change-case-for-t...
  • Plugin version: 2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2013
  • Latest release: Jul 21, 2023
  • Number of updates: 67
  • Update frequency: every 54.1 days
  • Top authors: MasterK (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

2,000+ active /34,916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.52ms] Passed 4 tests

Server-side resources used by Change Text Case
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.92 ▼5.58
Dashboard /wp-admin3.31 ▲0.0143.52 ▼7.34
Posts /wp-admin/edit.php3.36 ▲0.0145.56 ▼0.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.02 ▼8.69
Media Library /wp-admin/upload.php3.24 ▲0.0133.31 ▼0.19
Change Case /wp-admin/options-general.php?page=change-case3.2027.61

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
CC_HR_OPTIONS
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Change Text Case
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.37 ▼0.981.60 ▼0.3643.62 ▼0.83
Dashboard /wp-admin2,204 ▲165.79 ▲0.92106.52 ▼10.6739.47 ▼8.40
Posts /wp-admin/edit.php2,096 ▲71.98 ▼0.0438.46 ▲3.7135.93 ▼0.00
Add New Post /wp-admin/post-new.php1,536 ▲2223.13 ▲5.31630.25 ▼80.6453.10 ▼0.20
Media Library /wp-admin/upload.php1,389 ▲14.21 ▲0.0193.19 ▼6.6140.38 ▼6.07
Change Case /wp-admin/options-general.php?page=change-case8662.0323.8028.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • CC_HR_OPTIONS
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/change-case-for-tinymce/change-case.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/change-case-for-tinymce/change-case.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: tinymce, text, case, editor

change-case-for-tinymce/change-case.php 92% from 13 tests

The principal PHP file in "Change Text Case" v. 2.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("change-case-for-tinymce.php" instead of "change-case.php")

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 detected210 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11310124
JavaScript17386

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods675.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/ac.png0.53KB0.32KB▼ 39.81%
js/sc.png0.55KB0.31KB▼ 43.24%
js/tc.png0.48KB0.29KB▼ 39.06%
js/nc.png0.46KB0.28KB▼ 40.08%