100% template-map

Code Review | Template Map

WordPress plugin Template Map scored 100% from 54 tests.

About plugin

  • Plugin page: template-map
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 5.8.1
  • First release: Jul 18, 2014
  • Latest release: Dec 23, 2015
  • Number of updates: 9
  • Update frequency: every 58.1 days
  • Top authors: jchristopher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,024 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼144.38ms] Passed 4 tests

Analyzing server-side resources used by Template Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1334.76 ▲12.75
Dashboard /wp-admin3.08 ▲0.0247.26 ▲4.23
Posts /wp-admin/edit.php3.10 ▼0.0146.61 ▲5.32
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.57 ▼582.57
Media Library /wp-admin/upload.php3.03 ▲0.0134.64 ▼4.49

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Template Map
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.28 ▲0.649.75 ▼1.2444.29 ▼13.36
Dashboard /wp-admin2,973 ▲395.94 ▼0.01130.53 ▼17.46115.08 ▼2.82
Posts /wp-admin/edit.php2,739 ▲32.71 ▲0.0160.62 ▲0.6087.03 ▼5.98
Add New Post /wp-admin/post-new.php1,672 ▲5718.90 ▼2.42378.74 ▲104.90114.91 ▲11.85
Media Library /wp-admin/upload.php1,733 ▼775.00 ▼0.02141.17 ▼2.07116.65 ▼3.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: link, template

template-map/template-map.php 92% from 13 tests

"Template Map" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin159 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP229108113
Markdown119046

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.78
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected