78% display-template-name

Code Review | Display Template Name

WordPress plugin Display Template Name scored78%from 54 tests.

About plugin

  • Plugin page: display-template-...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.4.1
  • WordPress version: 6.3.1
  • First release: May 28, 2012
  • Latest release: Jan 25, 2016
  • Number of updates: 43
  • Update frequency: every 31.2 days
  • Top authors: Aurelien (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active /31,634 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.06ms] Passed 4 tests

Analyzing server-side resources used by Display Template Name
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0131.91 ▼9.06
Dashboard /wp-admin3.36 ▲0.0550.84 ▲0.15
Posts /wp-admin/edit.php3.41 ▲0.0547.86 ▲2.12
Add New Post /wp-admin/post-new.php5.94 ▲0.05105.04 ▲12.98
Media Library /wp-admin/upload.php3.28 ▲0.0535.93 ▲2.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
DisplayTemplateNameAdminOptions
widget_recent-comments

Browser metrics Passed 4 tests

Display Template Name: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.26 ▼1.121.92 ▼0.0143.58 ▼2.13
Dashboard /wp-admin2,215 ▲274.87 ▼0.01108.98 ▼1.7443.81 ▼2.71
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0335.65 ▼4.2132.15 ▼0.30
Add New Post /wp-admin/post-new.php1,537 ▼523.08 ▼0.08728.45 ▲36.5756.09 ▼3.82
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0194.62 ▼8.3142.18 ▼3.43
Display Template Name /wp-admin/display-template-name.php260.440.0714.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/display-template-name/display-template-name.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/display-template-name.php
    • > Network (severe)
    wp-admin/display-template-name.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Screenshots: Please add images for these screenshots: #1 (Area display debug.), #2 (Page display customization)
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

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

The entry point to "Display Template Name" version 1.7.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected395 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25548295
PO File2245074
CSS14026

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/masque_tr.png1.62KB0.46KB▼ 71.93%
images/masque_br.png1.61KB0.46KB▼ 71.73%
images/default.png14.32KB13.02KB▼ 9.12%
images/masque_tl.png1.62KB0.46KB▼ 71.78%
images/mac.png6.36KB5.40KB▼ 15.05%