84% posts-by-category

Code Review | Posts by Category

WordPress plugin Posts by Category scored84%from 54 tests.

About plugin

  • Plugin page: posts-by-category
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.9.6
  • WordPress version: 6.3.1
  • First release: Sep 8, 2014
  • Latest release: Jun 7, 2018
  • Number of updates: 9
  • Update frequency: every 152.4 days
  • Top authors: Shellbot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,189 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Posts by Category
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.05 ▼4.71
Dashboard /wp-admin3.31 ▲0.0146.17 ▼4.85
Posts /wp-admin/edit.php3.36 ▲0.0148.11 ▲1.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.37 ▼14.25
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▼0.09

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts by Category
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.74 ▼0.011.92 ▲0.0743.41 ▼0.36
Dashboard /wp-admin2,212 ▲246.04 ▲0.93110.69 ▼5.1240.31 ▼6.10
Posts /wp-admin/edit.php2,100 ▲112.03 ▲0.0137.58 ▲1.4140.11 ▼0.77
Add New Post /wp-admin/post-new.php1,542 ▲2823.14 ▲5.61672.31 ▼19.0656.00 ▲1.25
Media Library /wp-admin/upload.php1,400 ▲154.26 ▲0.0495.41 ▼5.8442.97 ▼0.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-by-category/posts-by-category.php:32

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: list, shortcode, category, tag, posts

posts-by-category/posts-by-category.php Passed 13 tests

"Posts by Category" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
Display posts from a particular category or tag in a variety of ways.

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
Good job! No executable or dangerous file extensions detected131 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16934131

PHP code Passed 2 tests

A brief analysis 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.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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
PNG images were not found in this plugin