84% wp-custom-post-template-redux

Code Review | WP Custom Post Template Redux

WordPress plugin WP Custom Post Template Redux scored84%from 54 tests.

About plugin

  • Plugin page: wp-custom-post-te...
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2016
  • Latest release: Jul 11, 2016
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: matstars (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,037 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.04MB] [CPU: ▼3.30ms] Passed 4 tests

Analyzing server-side resources used by WP Custom Post Template Redux
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.47 ▲2.68
Dashboard /wp-admin3.36 ▲0.0149.35 ▼13.06
Posts /wp-admin/edit.php3.47 ▲0.1147.93 ▼0.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.58 ▼2.10
Media Library /wp-admin/upload.php3.28 ▲0.0538.81 ▲5.05
Custom Post Template /wp-admin/options-general.php?page=custom_post_template3.2533.20

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Custom Post Template Redux
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.35 ▲0.131.67 ▼0.2942.16 ▼1.07
Dashboard /wp-admin2,199 ▲225.60 ▼0.0590.26 ▲0.1440.00 ▼2.74
Posts /wp-admin/edit.php2,104 ▲42.05 ▲0.0535.42 ▼1.1341.40 ▲1.06
Add New Post /wp-admin/post-new.php1,548 ▲223.07 ▼0.24660.08 ▲33.7155.88 ▲6.52
Media Library /wp-admin/upload.php1,398 ▼54.14 ▼0.0899.18 ▼1.6642.99 ▼4.34
Custom Post Template /wp-admin/options-general.php?page=custom_post_template7962.0326.6828.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-custom-post-template-redux/inc/integrations/acf.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-custom-post-template-redux/inc/integrations/acf.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-custom-post-template-redux/inc/integrations/acf.php:13

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-custom-post-template-redux/wp-custom-post-template-redux.php 92% from 13 tests

This is the main PHP file of "WP Custom Post Template Redux" version 1.4.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected263 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP512416246
JSON10017

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.34
Average class complexity11.00
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods20100.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected