84% pit-title-capitalize

Code Review | PiT Title Capitalize

WordPress plugin PiT Title Capitalize scored84%from 54 tests.

About plugin

  • Plugin page: pit-title-capitalize
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2013
  • Latest release: Jan 25, 2014
  • Number of updates: 16
  • Update frequency: every 5.2 days
  • Top authors: bihosh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,250 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.59ms] Passed 4 tests

Server-side resources used by PiT Title Capitalize
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.80 ▼8.67
Dashboard /wp-admin3.31 ▲0.0149.19 ▲1.12
Posts /wp-admin/edit.php3.36 ▲0.0047.52 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.90 ▼17.81
Media Library /wp-admin/upload.php3.23 ▲0.0034.65 ▼1.56

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for PiT Title Capitalize
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.091.75 ▲0.0039.83 ▼1.96
Dashboard /wp-admin2,206 ▲205.83 ▲0.86101.80 ▼8.2540.16 ▼2.08
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0541.79 ▲1.1735.47 ▼0.40
Add New Post /wp-admin/post-new.php1,514 ▼2817.70 ▼0.53584.31 ▼16.6757.69 ▼6.07
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0999.33 ▼1.0641.66 ▲0.11

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pit-title-capitalize/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === pit-title-capitalize === )
The official readme.txt is a good inspiration

pit-title-capitalize/index.php 92% from 13 tests

The main PHP script in "PiT Title Capitalize" version 1.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pit-title-capitalize.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1287

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin