84% custom-category-template

Code Review | Custom Category Template

WordPress plugin Custom Category Template scored84%from 54 tests.

About plugin

  • Plugin page: custom-category-t...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.7.0
  • WordPress version: 6.3.1
  • First release: May 5, 2012
  • Latest release: Dec 13, 2016
  • Number of updates: 7
  • Update frequency: every 240.6 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

3,000+ active /37,434 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
Install script ran successfully

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

A check of server-side resources used by Custom Category Template
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.98 ▼8.06
Dashboard /wp-admin3.32 ▲0.0143.72 ▼1.93
Posts /wp-admin/edit.php3.37 ▲0.0147.70 ▼0.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.10 ▼25.96
Media Library /wp-admin/upload.php3.24 ▲0.0135.88 ▲2.97

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

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

Browser metrics Passed 4 tests

Custom Category Template: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.68 ▼0.1940.63 ▼2.22
Dashboard /wp-admin2,209 ▲215.90 ▲1.0397.82 ▼2.2539.37 ▼4.79
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0538.78 ▼1.9937.25 ▲0.60
Add New Post /wp-admin/post-new.php1,542 ▼018.30 ▼0.22599.42 ▼5.2253.68 ▲2.26
Media Library /wp-admin/upload.php1,391 ▲34.18 ▲0.0197.13 ▼2.4641.63 ▼1.64

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-category-template/category_template.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
4 plugin tags: category, custom template, category theme, category template

custom-category-template/category_template.php 92% from 13 tests

The main PHP file in "Custom Category Template" ver. 0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-category-template.php" instead of "category_template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1148366

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin