84% list-category-posts

Code Review | List category posts

WordPress plugin List category posts scored84%from 54 tests.

About plugin

  • Plugin page: list-category-posts
  • Plugin version: 0.89.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Aug 16, 2008
  • Latest release: Nov 17, 2023
  • Number of updates: 293
  • Update frequency: every 19.0 days
  • Top authors: fernandobt (100%)

Code review

54 tests

User reviews

250 reviews

Install metrics

100,000+ active /3,631,393 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▼5.50ms] Passed 4 tests

A check of server-side resources used by List category posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4140.58 ▲1.09
Dashboard /wp-admin3.72 ▲0.3747.00 ▼9.81
Posts /wp-admin/edit.php3.77 ▲0.4148.17 ▼2.95
Add New Post /wp-admin/post-new.php6.24 ▲0.3587.93 ▼8.51
Media Library /wp-admin/upload.php3.64 ▲0.4135.81 ▼0.72
List Category Posts /wp-admin/options-general.php?page=list-category-posts3.5534.39

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
numberposts
widget_listcategorypostswidget
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

List category posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲2214.72 ▲0.531.62 ▼0.0438.69 ▼5.50
Dashboard /wp-admin2,199 ▲225.60 ▲0.0291.10 ▼2.4740.95 ▼5.27
Posts /wp-admin/edit.php2,107 ▲41.94 ▼0.0136.87 ▼4.0533.51 ▼7.49
Add New Post /wp-admin/post-new.php1,529 ▲323.17 ▲0.18692.16 ▲19.9550.00 ▼3.94
Media Library /wp-admin/upload.php1,407 ▲134.26 ▲0.0795.08 ▼7.5042.81 ▼1.71
List Category Posts /wp-admin/options-general.php?page=list-category-posts1,0041.9623.0645.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_listcategorypostswidget
    • numberposts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'LCP_PATHlcp-utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/list-category-posts/include/lcp-parameters.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/list-category-posts/include/lcp-widget.php:7
    • > PHP Warning
      Use of undefined constant LCP_PATH - assumed 'LCP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/list-category-posts/include/lcp-parameters.php on line 2
    • > PHP Warning
      require_once(LCP_PATHlcp-utils.php): failed to open stream: No such file or directory in wp-content/plugins/list-category-posts/include/lcp-parameters.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/list-category-posts/include/lcp-widget-form.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/list-category-posts/include/lcp-catlist.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/list-category-posts/include/lcp-options.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/list-category-posts/include/lcp-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/list-category-posts/include/lcp-catlist.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/list-category-posts/templates/default.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: cms, list, posts, categories

list-category-posts/list-category-posts.php 92% from 13 tests

The entry point to "List category posts" version 0.89.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 379 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,736 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP173958502,388
PO File123844871,342
CSS1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.43
▷ Minimum class complexity6.00
▷ Maximum class complexity90.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods137
▷ Static methods1410.22%
▷ Public methods8259.85%
▷ Protected methods00.00%
▷ Private methods5540.15%
Functions13
▷ Named functions861.54%
▷ Anonymous functions538.46%
Constants1
▷ Global constants1100.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 images were found in this plugin