10% wp-template-viewer

Code Review | WP Template Viewer

WordPress plugin WP Template Viewer scored 10% from 54 tests.

About plugin

  • Plugin page: wp-template-viewer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.4
  • WordPress version: 6.3.1
  • First release: Jul 9, 2014
  • Latest release: Apr 7, 2020
  • Number of updates: 22
  • Update frequency: every 95.4 days
  • Top authors: keesiemeijer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 5,001 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_TV_Template_Viewer::wp_tv_activate() should not be called statically

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.46ms] Passed 4 tests

This is a short check of server-side resources used by WP Template Viewer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.33 ▼0.38
Dashboard /wp-admin3.38 ▲0.0847.57 ▼4.86
Posts /wp-admin/edit.php3.43 ▲0.0746.12 ▼0.45
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.16 ▼4.13
Media Library /wp-admin/upload.php3.30 ▲0.0736.94 ▲1.86

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WP Template Viewer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,225 ▲49014.32 ▼0.2714.48 ▲12.8941.02 ▼0.59
Dashboard /wp-admin2,209 ▲214.88 ▼0.03100.16 ▼5.1843.41 ▲5.12
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0537.11 ▼0.1930.40 ▼1.88
Add New Post /wp-admin/post-new.php1,514 ▼2017.66 ▼5.33601.07 ▲2.0156.49 ▼6.92
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0498.24 ▼4.3742.58 ▼1.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_TV_Template_Viewer::wp_tv_deactivate() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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/wp-template-viewer/wp-template-viewer.php:95

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: template files, content, template, files, file content...

wp-template-viewer/wp-template-viewer.php 92% from 13 tests

The primary PHP file in "WP Template Viewer" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin548 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1144227309
CSS2275145
JavaScript1271194

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin