89% which-template-am-i

Code Review | Which Template Am I

WordPress plugin Which Template Am I scored89%from 54 tests.

About plugin

  • Plugin page: which-template-am-i
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2014
  • Latest release: Sep 18, 2021
  • Number of updates: 29
  • Update frequency: every 91.0 days
  • Top authors: neilgee (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /5,055 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Which Template Am I
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.03 ▼3.21
Dashboard /wp-admin3.31 ▲0.0042.90 ▼6.33
Posts /wp-admin/edit.php3.36 ▲0.0045.89 ▲3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.07 ▼5.44
Media Library /wp-admin/upload.php3.23 ▲0.0032.94 ▼2.26

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Which Template Am I
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.20 ▼1.034.75 ▲2.7946.61 ▼2.67
Dashboard /wp-admin2,206 ▲185.81 ▼0.0999.07 ▼6.5338.47 ▼4.62
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0338.49 ▲2.5134.66 ▼0.74
Add New Post /wp-admin/post-new.php1,533 ▲1923.08 ▲5.40671.26 ▼12.6154.25 ▼10.91
Media Library /wp-admin/upload.php1,382 ▼94.19 ▼0.0596.01 ▼0.5442.51 ▲0.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === which-template-am-i === )
Please take inspiration from this readme.txt

which-template-am-i/which-wordpress-template.php 92% from 13 tests

This is the main PHP file of "Which Template Am I" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("which-template-am-i.php" instead of "which-wordpress-template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171355

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
There were not PNG files found in your plugin