83% wp-post-template

Code Review | Post Template

WordPress plugin Post Template scored83%from 54 tests.

About plugin

  • Plugin page: wp-post-template
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2012
  • Latest release: Dec 10, 2012
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: indianic (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

800+ active /22,358 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.66MB] [CPU: ▼19.74ms] Passed 4 tests

An overview of server-side resources used by Post Template
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.29 ▲2.98
Dashboard /wp-admin3.33 ▲0.0345.23 ▼0.94
Posts /wp-admin/edit.php3.38 ▲0.0345.33 ▼7.34
Add New Post /wp-admin/post-new.php3.16 ▼2.7339.18 ▼65.12
Media Library /wp-admin/upload.php3.25 ▲0.0331.63 ▼5.54

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Template
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.73 ▲0.351.69 ▼0.0644.62 ▼0.52
Dashboard /wp-admin2,209 ▲214.86 ▼0.28104.01 ▼9.2339.49 ▼6.92
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0434.55 ▼5.5433.14 ▼1.50
Add New Post /wp-admin/post-new.php6,288 ▲4,76919.20 ▼4.23893.10 ▲244.8353.01 ▲1.91
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0293.81 ▼10.1440.95 ▼4.61

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at 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 plugin_dir_path() in wp-content/plugins/wp-post-template/inic-post-template.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (screenshot-1.png) image not found
Please take inspiration from this readme.txt

wp-post-template/inic-post-template.php 85% from 13 tests

The main PHP script in "Post Template" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 242 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-post-template.php" instead of "inic-post-template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected106 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1288106

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods218.18%
▷ Private methods00.00%
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
1 PNG file occupies 0.23MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png234.91KB120.21KB▼ 48.83%