84% what-the-template

Code Review | What The Template

WordPress plugin What The Template scored 84% from 54 tests.

About plugin

  • Plugin page: what-the-template
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2016
  • Latest release: Aug 24, 2016
  • Number of updates: 11
  • Update frequency: every 14.3 days
  • Top authors: kevinvhengst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 574 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by What The Template
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.64 ▼3.24
Dashboard /wp-admin3.31 ▲0.0151.28 ▲1.97
Posts /wp-admin/edit.php3.36 ▲0.0148.13 ▼4.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.18 ▼6.48
Media Library /wp-admin/upload.php3.23 ▲0.0035.03 ▲0.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for What The Template
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.161.66 ▼0.0143.95 ▼0.38
Dashboard /wp-admin2,206 ▲155.86 ▲0.99126.07 ▲24.9141.12 ▲1.55
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0139.88 ▲6.8136.02 ▲3.42
Add New Post /wp-admin/post-new.php1,514 ▼2217.45 ▼5.64641.59 ▲18.2853.22 ▲1.01
Media Library /wp-admin/upload.php1,391 ▲34.13 ▼0.1197.97 ▼0.4244.54 ▼1.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/what-the-template/what-the-template.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: page, templates, admin, template, pages

what-the-template/what-the-template.php Passed 13 tests

The primary PHP file in "What The Template" version 1.0 is used by WordPress to initiate all plugin functionality
83 characters long description:
This plugin shows what template file is being used for a page in the admin overview

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin54 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1221038
Markdown17016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods266.67%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected