83% current-template-name

Code Review | TempTool [Show Current Template Info]

WordPress plugin TempTool [Show Current Template Info] scored83%from 54 tests.

About plugin

  • Plugin page: current-template-...
  • Plugin version: 1.1.12
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Aug 26, 2023
  • Number of updates: 46
  • Update frequency: every 26.9 days
  • Top authors: nayanchamp7 (54.35%)wpfeelteam (47.83%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /9,505 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.26MB] [CPU: ▼3.41ms] Passed 4 tests

Server-side resources used by TempTool [Show Current Template Info]
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2440.02 ▲0.44
Dashboard /wp-admin3.61 ▲0.3151.80 ▲0.08
Posts /wp-admin/edit.php3.66 ▲0.3152.11 ▲0.76
Add New Post /wp-admin/post-new.php6.15 ▲0.2686.39 ▼14.93
Media Library /wp-admin/upload.php3.47 ▲0.2450.70 ▲13.14
TempTool /wp-admin/options-general.php?page=current-template-name3.4433.06

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

TempTool [Show Current Template Info]: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.69 ▲0.282.04 ▲0.3341.07 ▼3.40
Dashboard /wp-admin2,199 ▲255.65 ▼0.0398.00 ▲14.7546.31 ▲4.33
Posts /wp-admin/edit.php2,104 ▲72.04 ▲0.0238.99 ▲4.1634.26 ▲0.82
Add New Post /wp-admin/post-new.php1,534 ▲823.20 ▲0.14711.33 ▲48.6959.83 ▲10.82
Media Library /wp-admin/upload.php1,404 ▲44.14 ▼0.07123.26 ▲25.1551.67 ▲6.70
TempTool /wp-admin/options-general.php?page=current-template-name8142.0024.8325.63

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/current-template-name/includes/class-ctn-suggest-plugins.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots lack descriptions #2, #3 in current-template-name/assets to your readme.txt
You can look at the official readme.txt

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

The main PHP script in "TempTool [Show Current Template Info]" version 1.1.12 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 227 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
Success! There were no dangerous files found in this plugin2,282 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP104978641,922
Markdown1700196
XML151199
YAML16032
JSON10021
JavaScript13712

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.40
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods123
▷ Static methods86.50%
▷ Public methods8569.11%
▷ Protected methods64.88%
▷ Private methods3226.02%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin