88% what-template-am-i-using

Code Review | What Template Am I Using

WordPress plugin What Template Am I Using scored 88% from 54 tests.

About plugin

  • Plugin page: what-template-am-...
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.4.0
  • WordPress version: 5.8.1
  • First release: Jan 24, 2014
  • Latest release: Dec 8, 2015
  • Number of updates: 33
  • Update frequency: every 20.7 days
  • Top authors: webdeveric (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

300+ active / 7,750 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼145.37ms] Passed 4 tests

This is a short check of server-side resources used by What Template Am I Using
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.37 ▲0.6541.67 ▲21.34
Dashboard /wp-admin3.15 ▲0.1047.25 ▲2.30
Posts /wp-admin/edit.php3.20 ▲0.1048.45 ▼3.05
Add New Post /wp-admin/post-new.php5.46 ▲0.0297.74 ▼566.30
Media Library /wp-admin/upload.php3.03 ▲0.0331.71 ▼14.43

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for What Template Am I Using
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /12,766 ▲9,17017.16 ▲1.5535.85 ▲25.4798.23 ▲43.80
Dashboard /wp-admin2,973 ▲365.92 ▼0.06140.54 ▼10.26115.52 ▼7.71
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0065.51 ▼3.9997.04 ▼1.74
Add New Post /wp-admin/post-new.php1,615 ▼6821.36 ▲2.87293.19 ▼168.79113.44 ▼22.51
Media Library /wp-admin/upload.php1,810 ▲35.02 ▲0.00155.77 ▼15.61126.77 ▼28.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 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 0% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/what-template-am-i-using/what-is-my-ip.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/what-template-am-i-using/what-template-am-i-using.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'WTAIU_Panel' not found in wp-content/plugins/what-template-am-i-using/inc/core-panels.php:3

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: server information, debug, template, theme development

what-template-am-i-using/what-template-am-i-using.php 92% from 13 tests

The main PHP file in "What Template Am I Using" ver. 0.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

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
Success! There were no dangerous files found in this plugin1,938 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP518039781
Sass31120474
JavaScript37038353
JSON2290183
PO File14143105
Markdown120040
CSS2222

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.80
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods71
▷ Static methods1419.72%
▷ Public methods7098.59%
▷ Protected methods11.41%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/down-arrow.png0.22KB0.21KB▼ 6.14%
assets/imgs/up-arrow.png0.20KB0.21KB0.00%