83% posts-per-cat

Code Review | Posts per Cat [Unmaintained]

WordPress plugin Posts per Cat [Unmaintained] scored 83% from 54 tests.

About plugin

  • Plugin page: posts-per-cat
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.4
  • WordPress version: 6.3.1
  • First release: Mar 4, 2009
  • Latest release: Dec 28, 2020
  • Number of updates: 54
  • Update frequency: every 79.9 days
  • Top authors: urkekg (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active / 51,511 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.83ms] Passed 4 tests

Server-side resources used by Posts per Cat [Unmaintained]
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0623.78 ▼18.87
Dashboard /wp-admin3.45 ▲0.1445.19 ▼5.61
Posts /wp-admin/edit.php3.50 ▲0.1450.97 ▲3.62
Add New Post /wp-admin/post-new.php6.03 ▲0.1486.54 ▼2.45
Media Library /wp-admin/upload.php3.37 ▲0.1436.73 ▲4.08

Server storage [IO: ▲0.14MB] [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: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_ppc_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Posts per Cat [Unmaintained]
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.28 ▼1.284.23 ▲2.1644.82 ▼6.48
Dashboard /wp-admin2,216 ▲285.83 ▲0.96106.14 ▼8.7240.86 ▼7.66
Posts /wp-admin/edit.php2,098 ▲92.14 ▲0.1540.35 ▲2.4538.19 ▲4.40
Add New Post /wp-admin/post-new.php1,524 ▼917.60 ▼5.66664.92 ▲55.3555.74 ▼2.32
Media Library /wp-admin/upload.php1,401 ▲104.16 ▼0.0399.54 ▼3.4942.22 ▼2.03

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_ppc_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
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/posts-per-cat/inc/widget.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

posts-per-cat/wp-postspercat.php 85% from 13 tests

The main PHP script in "Posts per Cat [Unmaintained]" version 1.4.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("posts-per-cat.php" instead of "wp-postspercat.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 475 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,505 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP4184173991
PO File2144267408
CSS4418106

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity42.33
▷ Minimum class complexity6.00
▷ Maximum class complexity62.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected