84% custom-category-listing-page

Code Review | Custom Category Listing Page

WordPress plugin Custom Category Listing Page scored 84% from 54 tests.

About plugin

  • Plugin page: custom-category-l...
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.3
  • WordPress version: 5.8.1
  • First release: Mar 14, 2019
  • Latest release: Nov 14, 2019
  • Number of updates: 40
  • Update frequency: every 6.2 days
  • Top authors: trooinbound (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,689 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
Installer ran successfully

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

A check of server-side resources used by Custom Category Listing Page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.03 ▲11.96
Dashboard /wp-admin3.07 ▲0.0237.71 ▼7.59
Posts /wp-admin/edit.php3.12 ▲0.0148.17 ▼6.87
Add New Post /wp-admin/post-new.php5.44 ▲0.0084.25 ▼555.39
Media Library /wp-admin/upload.php3.02 ▲0.0131.42 ▲0.72

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 2 new options
New WordPress options
troo_post_type
troo_taxonomy

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Category Listing Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,688 ▲5115.81 ▲0.198.04 ▲0.4845.78 ▼7.33
Dashboard /wp-admin2,975 ▲445.93 ▲0.03133.94 ▼6.58105.30 ▼7.22
Posts /wp-admin/edit.php2,741 ▲52.70 ▲0.0163.51 ▲1.7290.53 ▲0.27
Add New Post /wp-admin/post-new.php1,683 ▲18517.62 ▼1.23357.86 ▼9.05103.04 ▼1.78
Media Library /wp-admin/upload.php1,812 ▲55.05 ▲0.04146.99 ▼2.04109.96 ▼10.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 2 options
    • troo_taxonomy
    • troo_post_type

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_post_thumbnail_url() in wp-content/plugins/custom-category-listing-page/templates/default.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-category-listing-page/custom-category-listing-page.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

custom-category-listing-page/custom-category-listing-page.php Passed 13 tests

The entry point to "Custom Category Listing Page" version 2.0.5 is a PHP file that has certain tags in its header comment area
95 characters long description:
A simple shortcode to list the Products And Posts for each Category by Order ex: [post_listing]

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected9,301 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS431132,526
Sass1434341,768
LESS1434441,758
PHP21618420
JavaScript214158

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin