84% custom-category-templates

Code Review | Custom Category Templates

WordPress plugin Custom Category Templates scored84%from 54 tests.

About plugin

  • Plugin page: custom-category-t...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Dec 4, 2011
  • Latest release: Mar 3, 2016
  • Number of updates: 15
  • Update frequency: every 103.4 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /59,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Custom Category Templates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.31 ▼3.69
Dashboard /wp-admin3.32 ▲0.0150.00 ▼3.16
Posts /wp-admin/edit.php3.37 ▲0.0151.59 ▼3.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.37 ▼6.25
Media Library /wp-admin/upload.php3.24 ▲0.0132.41 ▼0.58

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Category Templates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.611.71 ▼0.0444.16 ▲1.17
Dashboard /wp-admin2,195 ▲215.56 ▼0.1190.40 ▼21.5236.95 ▼16.00
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0438.88 ▼2.6436.46 ▼0.31
Add New Post /wp-admin/post-new.php1,526 ▼723.09 ▲0.37676.30 ▲15.1164.94 ▲8.57
Media Library /wp-admin/upload.php1,403 ▼04.18 ▼0.0999.85 ▼4.1945.50 ▼3.31

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/custom-category-templates/custom-category-templates.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: category, template, theme, custom-template, category-template

custom-category-templates/custom-category-templates.php 92% from 13 tests

The main PHP script in "Custom Category Templates" version 0.2.1 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin115 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12232115

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin