84% category-post-count

Code Review | Category Post Count

WordPress plugin Category Post Count scored84%from 54 tests.

About plugin

  • Plugin page: category-post-count
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 6.3.1
  • First release: Aug 7, 2015
  • Latest release: Dec 12, 2015
  • Number of updates: 5
  • Update frequency: every 25.2 days
  • Top authors: karalamalar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Category Post Count
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.68 ▼1.41
Dashboard /wp-admin3.32 ▲0.0247.82 ▼5.99
Posts /wp-admin/edit.php3.37 ▲0.0250.73 ▼1.31
Add New Post /wp-admin/post-new.php5.90 ▲0.02115.43 ▲20.73
Media Library /wp-admin/upload.php3.24 ▲0.0136.33 ▼1.01

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Category Post Count
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.091.72 ▲0.0951.71 ▲6.62
Dashboard /wp-admin2,192 ▲155.65 ▼0.0284.50 ▼7.7043.40 ▼0.01
Posts /wp-admin/edit.php2,103 ▼02.01 ▼0.0344.16 ▲2.3537.66 ▼1.25
Add New Post /wp-admin/post-new.php1,526 ▼2423.32 ▲5.31684.50 ▲22.3055.36 ▼18.06
Media Library /wp-admin/upload.php1,397 ▼34.12 ▼0.06115.25 ▼1.4855.04 ▲9.53

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
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/category-post-count/category-post-count.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: count, category, posts_per_rss, categories, posts_per_page

category-post-count/category-post-count.php Passed 13 tests

The main file in "Category Post Count" v. 0.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
101 characters long description:
With this plugin you can set the posts_per_page and posts_per_rss settings for individual categories.

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
Everything looks great! No dangerous files found in this plugin241 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP31719122
PO File33036119

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin