90% post-templator

Code Review | Post Templator

WordPress plugin Post Templator scored90%from 54 tests.

About plugin

  • Plugin page: post-templator
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2023
  • Latest release: Mar 28, 2023
  • Number of updates: 18
  • Update frequency: every 0.3 days
  • Top authors: lotus0templator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /314 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.70ms] Passed 4 tests

An overview of server-side resources used by Post Templator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.28 ▼5.52
Dashboard /wp-admin3.35 ▲0.0551.89 ▲1.90
Posts /wp-admin/edit.php3.40 ▲0.0548.40 ▼2.19
Add New Post /wp-admin/post-new.php5.99 ▲0.1088.12 ▼4.99
Media Library /wp-admin/upload.php3.28 ▲0.0536.30 ▲3.40
テンプレート /wp-admin/edit.php?post_type=template3.3638.83
新規テンプレート登録 /wp-admin/post-new.php?post_type=template5.9877.81

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

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

Browser metrics Passed 4 tests

Post Templator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.24 ▼0.051.86 ▼0.5943.57 ▼0.62
Dashboard /wp-admin2,225 ▲455.59 ▼0.0686.16 ▼19.8849.27 ▲1.59
Posts /wp-admin/edit.php2,130 ▲302.01 ▲0.0337.09 ▼1.0743.25 ▲5.61
Add New Post /wp-admin/post-new.php1,549 ▲2323.00 ▼0.16649.64 ▼27.9563.20 ▲7.64
Media Library /wp-admin/upload.php1,430 ▲274.17 ▼0.0795.86 ▼6.9648.70 ▲1.12
テンプレート /wp-admin/edit.php?post_type=template1,6472.0034.5364.89
新規テンプレート登録 /wp-admin/post-new.php?post_type=template6,25619.15886.7064.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: template, new post

post-templator/post-templator.php Passed 13 tests

The primary PHP file in "Post Templator" version 1.0.0 is used by WordPress to initiate all plugin functionality
63 characters long description:
シンプルなテンプレートによる投稿作成機能。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin171 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13030171

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin