94% add-trailing-text-to-title

Code Review | Add trailing text to title

WordPress plugin Add trailing text to title scored 94% from 54 tests.

About plugin

  • Plugin page: add-trailing-text...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 5.9.2
  • First release: Jan 5, 2016
  • Latest release: Jan 4, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: igorosabel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 545 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

An overview of server-side resources used by Add trailing text to title
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0256.61 ▼0.83
Dashboard /wp-admin3.42 ▲0.0232.20 ▼1.40
Posts /wp-admin/edit.php3.66 ▲0.0248.48 ▲12.02
Add New Post /wp-admin/post-new.php6.89 ▼0.0896.98 ▼1,184.98
Media Library /wp-admin/upload.php3.31 ▲0.0123.47 ▲0.19

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Add trailing text to title: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲5915.83 ▲0.065.86 ▼0.502.33 ▼0.27
Dashboard /wp-admin2,919 ▲616.13 ▼0.02162.17 ▲25.25165.57 ▼1.35
Posts /wp-admin/edit.php2,708 ▲153.24 ▲0.0166.32 ▼0.09181.14 ▼25.59
Add New Post /wp-admin/post-new.php1,674 ▲1316.54 ▼0.56433.17 ▲6.78200.94 ▲27.45
Media Library /wp-admin/upload.php1,714 ▲195.54 ▲0.02154.54 ▲6.87212.67 ▲13.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/add-trailing-text-to-title/add-trailing-text-to-title-plugin/admin/add-trailing-text-to-title-plugin-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-trailing-text-to-title/add-trailing-text-to-title.php:44
    • > PHP Notice
      Undefined variable: complete_url in wp-content/plugins/add-trailing-text-to-title/add-trailing-text-to-title-plugin/admin/add-trailing-text-to-title-plugin-admin.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === add-trailing-text-to-title === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (/assets/screenshot1.png), #2 (/assets/screenshot2.png)
You can look at the official readme.txt

add-trailing-text-to-title/add-trailing-text-to-title.php Passed 13 tests

The primary PHP file in "Add trailing text to title" version 1.0.0 is used by WordPress to initiate all plugin functionality
57 characters long description:
This plugin adds custom text trailing to the window title

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot2.png15.61KB6.03KB▼ 61.36%
assets/screenshot1.png19.63KB7.96KB▼ 59.47%