78% change-titles-case

Code Review | Change Titles Case

WordPress plugin Change Titles Case scored78%from 54 tests.

About plugin

  • Plugin page: change-titles-case
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2020
  • Latest release: Nov 15, 2021
  • Number of updates: 100
  • Update frequency: every 4.5 days
  • Top authors: mgparisi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /1,393 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.49MB] [CPU: ▼16.54ms] Passed 4 tests

An overview of server-side resources used by Change Titles Case
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.07 ▲5.22
Dashboard /wp-admin3.49 ▲0.1948.25 ▲2.24
Posts /wp-admin/edit.php3.61 ▲0.2545.06 ▼2.35
Add New Post /wp-admin/post-new.php3.37 ▼2.5235.54 ▼67.09
Media Library /wp-admin/upload.php3.42 ▲0.1935.22 ▲1.05
Title Case /wp-admin/options-general.php?page=change-titles-case3.3929.65

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
tc_change_case_defaults
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Change Titles Case
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.77 ▲0.491.86 ▲0.1043.84 ▲0.98
Dashboard /wp-admin2,206 ▲295.74 ▲0.0888.33 ▲2.7037.93 ▼3.72
Posts /wp-admin/edit.php2,138 ▲412.07 ▲0.1237.97 ▲3.6532.15 ▼2.86
Add New Post /wp-admin/post-new.php1,535 ▲923.10 ▲0.10640.35 ▲59.3847.28 ▼2.47
Media Library /wp-admin/upload.php1,408 ▲54.34 ▲0.1498.30 ▲1.7042.72 ▲0.66
Title Case /wp-admin/options-general.php?page=change-titles-case8572.1228.3326.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • tc_change_case_defaults
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/change-titles-case/admin/partials/change-titles-case-admin-display.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=change-titles-case
    • > Network (severe)
    wp-json/change-titles-case/v1/init - Failed to load resource: the server responded with a status of 404 (Not Found)

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
5 plugin tags: caps, title, utilities, backend, admin

change-titles-case/change-titles-case.php 92% from 13 tests

The entry point to "Change Titles Case" version 1.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected756 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10193744647
JavaScript2237482
CSS26427

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1123.40%
▷ Public methods3574.47%
▷ Protected methods00.00%
▷ Private methods1225.53%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/icon-128x128.png14.84KB5.72KB▼ 61.44%
icons/icon-256x256.png51.44KB16.39KB▼ 68.13%