83% templatic-singletemplate

Code Review | Custom Post Template By Templatic

WordPress plugin Custom Post Template By Templatic scored83%from 54 tests.

About plugin

  • Plugin page: templatic-singlet...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Oct 27, 2018
  • Number of updates: 30
  • Update frequency: every 29.3 days
  • Top authors: rbhavesh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /16,530 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.66MB] [CPU: ▼17.77ms] Passed 4 tests

This is a short check of server-side resources used by Custom Post Template By Templatic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.54 ▼5.92
Dashboard /wp-admin3.34 ▼0.0144.00 ▼12.49
Posts /wp-admin/edit.php3.39 ▲0.0347.37 ▲0.65
Add New Post /wp-admin/post-new.php3.19 ▼2.7036.84 ▼53.30
Media Library /wp-admin/upload.php3.26 ▲0.0338.69 ▲2.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
tmpl_post_detail_plugin_active
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Custom Post Template By Templatic
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.421.71 ▼0.1242.56 ▲0.36
Dashboard /wp-admin2,209 ▲245.85 ▼0.03110.81 ▲8.8237.39 ▼3.33
Posts /wp-admin/edit.php2,086 ▼02.04 ▲0.0335.14 ▼0.0230.73 ▼7.65
Add New Post /wp-admin/post-new.php1,514 ▼1917.51 ▼5.75665.02 ▼13.0551.34 ▲2.33
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.02107.72 ▲10.3246.84 ▲2.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/templatic-singletemplate/post_templates.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This is what the top of your new Post Type Templates should look like), #2 (This is the new box that this plugin adds to your post edit screen)
  • Plugin Name: Please specify the plugin name on the first line ( === templatic-singletemplate === )
You can look at the official readme.txt

templatic-singletemplate/post_templates.php 92% from 13 tests

"Custom Post Template By Templatic" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("templatic-singletemplate.php" instead of "post_templates.php")

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 plugin157 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16446124
PO File15533

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png26.01KB4.89KB▼ 81.20%
screenshot-1.png24.78KB3.63KB▼ 85.33%