74% show-template-name

Code Review | show template name

WordPress plugin show template name scored74%from 54 tests.

About plugin

  • Plugin page: show-template-name
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 26, 2019
  • Latest release: Sep 3, 2023
  • Number of updates: 7
  • Update frequency: every 192.4 days
  • Top authors: lruizcode (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /761 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.87ms] Passed 4 tests

This is a short check of server-side resources used by show template name
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0239.68 ▲2.13
Dashboard /wp-admin3.38 ▼0.0047.06 ▼19.15
Posts /wp-admin/edit.php3.43 ▲0.0450.52 ▲1.25
Add New Post /wp-admin/post-new.php5.96 ▲0.0493.25 ▲0.62
Media Library /wp-admin/upload.php3.30 ▲0.0435.74 ▲1.79

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for show template name
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.131.68 ▲0.0343.18 ▲2.61
Dashboard /wp-admin2,206 ▲214.84 ▼0.03105.23 ▲4.3438.64 ▼5.54
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0439.62 ▲0.1235.33 ▼0.88
Add New Post /wp-admin/post-new.php1,533 ▼023.10 ▼0.05617.84 ▼22.9555.24 ▲0.58
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.0597.85 ▲0.7641.80 ▼1.74

Uninstaller [IO: ✅] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > Compile error in wp-content/plugins/show-template-name/src/class-plugin.php+7
    Cannot declare class Bubuku\Plugins\ShowTemplateName\Plugin, because the name is already in use
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent

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
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/show-template-name/src/index.php
    • > /wp-content/plugins/show-template-name/view/index.php
    • > /wp-content/plugins/show-template-name/show-template-name.php
    • > /wp-content/plugins/show-template-name/index.php
    • > /wp-content/plugins/show-template-name/uninstall.php

User-side errors Passed 1 test

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

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
2 plugin tags: template, theme template

show-template-name/show-template-name.php 92% from 13 tests

The main PHP file in "show template name" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected188 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP658107188

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.33
▷ Minimum class complexity6.00
▷ Maximum class complexity19.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1173.33%
▷ Protected methods00.00%
▷ Private methods426.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants222.22%
▷ Class constants777.78%
▷ Public constants571.43%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected