84% show-current-template

Code Review | Show Current Template

WordPress plugin Show Current Template scored84%from 54 tests.

About plugin

  • Plugin page: show-current-temp...
  • Plugin version: 0.5.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Sep 16, 2023
  • Number of updates: 67
  • Update frequency: every 56.2 days
  • Top authors: tai (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

100,000+ active /921,222 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼16.95ms] Passed 4 tests

Analyzing server-side resources used by Show Current Template
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.02 ▼3.45
Dashboard /wp-admin3.33 ▲0.0343.92 ▼4.63
Posts /wp-admin/edit.php3.38 ▲0.0343.85 ▼5.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.31 ▼54.00
Media Library /wp-admin/upload.php3.26 ▲0.0334.03 ▲0.95

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Show Current Template
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,036 ▲30113.62 ▼0.765.33 ▲3.5243.48 ▼6.05
Dashboard /wp-admin2,206 ▲155.91 ▲1.01101.54 ▼1.3238.08 ▼6.02
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0736.98 ▼7.6336.20 ▼0.80
Add New Post /wp-admin/post-new.php1,514 ▼617.83 ▼5.42667.92 ▲30.9162.37 ▲10.18
Media Library /wp-admin/upload.php1,382 ▼04.21 ▲0.0294.62 ▼2.0040.26 ▼2.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/show-current-template/show-current-template.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
2 plugin tags: template, toolbar

show-current-template/show-current-template.php Passed 13 tests

The primary PHP file in "Show Current Template" version 0.5.2 is used by WordPress to initiate all plugin functionality
76 characters long description:
Show the current template file name in the tool bar. Is this useful for you?

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected265 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP13628159
CSS291871
PO File171025
JavaScript1007
Markdown1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin