84% current-template-info

Code Review | Show Current Template - CTI

WordPress plugin Show Current Template - CTI scored 84% from 54 tests.

About plugin

  • Plugin page: current-template-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Dec 16, 2018
  • Number of updates: 19
  • Update frequency: every 22.1 days
  • Top authors: spoot1986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 3,675 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Show Current Template - CTI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.32 ▼5.45
Dashboard /wp-admin3.34 ▲0.0444.49 ▼12.22
Posts /wp-admin/edit.php3.39 ▲0.0447.80 ▲1.85
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.60 ▼8.62
Media Library /wp-admin/upload.php3.26 ▲0.0437.33 ▲3.50

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Show Current Template - CTI
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14113.30 ▼1.081.65 ▼0.3640.17 ▼8.70
Dashboard /wp-admin2,239 ▲485.80 ▲0.9795.00 ▼19.1538.99 ▼6.61
Posts /wp-admin/edit.php2,129 ▲401.99 ▲0.0338.71 ▼2.5833.81 ▼1.81
Add New Post /wp-admin/post-new.php1,562 ▲2023.25 ▲5.15675.64 ▲50.7454.13 ▲0.54
Media Library /wp-admin/upload.php1,415 ▲274.22 ▲0.07103.29 ▼1.6245.02 ▲0.78

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/current-template-info/current-template-info.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (admin bar), #2 (admin bar)
The official readme.txt is a good inspiration

current-template-info/current-template-info.php 92% from 13 tests

This is the main PHP file of "Show Current Template - CTI" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin141 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1211294
PO File1143247

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.39KB5.09KB▼ 55.33%
screenshot-2.png11.75KB5.19KB▼ 55.84%