84% which-template

Code Review | Which Template

WordPress plugin Which Template scored84%from 54 tests.

About plugin

  • Plugin page: which-template
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.6
  • WordPress version: 6.3.1
  • First release: Jul 19, 2013
  • Latest release: Nov 26, 2020
  • Number of updates: 16
  • Update frequency: every 167.9 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /22,511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Which Template
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.60 ▲1.73
Dashboard /wp-admin3.33 ▼0.0244.95 ▼16.00
Posts /wp-admin/edit.php3.38 ▲0.0244.35 ▼3.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.15 ▼12.68
Media Library /wp-admin/upload.php3.25 ▲0.0236.94 ▲1.24

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

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

Browser metrics Passed 4 tests

Which Template: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.24 ▼1.511.78 ▲0.1341.21 ▲0.37
Dashboard /wp-admin2,203 ▲145.84 ▲0.8696.77 ▼7.4139.38 ▼4.14
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.1139.33 ▲0.8936.12 ▼1.22
Add New Post /wp-admin/post-new.php1,549 ▲3518.23 ▲0.53617.91 ▼57.2956.79 ▲4.67
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0894.91 ▼10.1645.11 ▼2.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WhichTemplate\\add_action() in wp-content/plugins/which-template/which-template.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

which-template/which-template.php Passed 13 tests

"Which Template" version 4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Helps the admin user work out which template a particular page is using.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162266

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
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
Namespaces1
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin