10% category-post-list-widget

Code Review | Category Post List Widget

WordPress plugin Category Post List Widget scored 10% from 54 tests.

About plugin

  • Plugin page: category-post-lis...
  • Plugin version: 2.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2012
  • Latest release: Oct 17, 2017
  • Number of updates: 18
  • Update frequency: every 97.8 days
  • Top authors: starkinfo (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active / 55,577 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/category-post-list-widget/category-post-list-widget.php+75
    Methods with the same name as their class will not be constructors in a future version of PHP; Category_Post_List_widget has a deprecated constructor

Server metrics [RAM: ▼1.73MB] [CPU: ▼52.10ms] Passed 4 tests

A check of server-side resources used by Category Post List Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.204.85 ▼44.39
Dashboard /wp-admin2.28 ▼1.027.19 ▼42.69
Posts /wp-admin/edit.php2.28 ▼1.077.46 ▼39.25
Add New Post /wp-admin/post-new.php2.28 ▼3.606.55 ▼82.07
Media Library /wp-admin/upload.php2.28 ▼0.956.62 ▼30.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Category Post List Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲10513.68 ▼0.555.54 ▲3.4041.46 ▼7.24
Dashboard /wp-admin2,218 ▲95.83 ▲0.04106.39 ▲11.6340.95 ▲1.69
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0536.04 ▼2.9835.18 ▲3.60
Add New Post /wp-admin/post-new.php1,529 ▼417.83 ▼5.43745.79 ▲159.4163.91 ▲14.46
Media Library /wp-admin/upload.php1,406 ▲154.33 ▲0.1297.80 ▼1.5142.16 ▼1.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/category-post-list-widget/category-post-list-widget.php+75
    Methods with the same name as their class will not be constructors in a future version of PHP; Category_Post_List_widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_category_post_list_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/category-post-list-widget/add-shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-post-list-widget/shortcode.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-post-list-widget/category-post-list-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-post-list-widget/functions.php:167

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 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 to be fixed:
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
Please take inspiration from this readme.txt

category-post-list-widget/category-post-list-widget.php Passed 13 tests

Analyzing the main PHP file in "Category Post List Widget" version 2.0
59 characters long description:
This plugin is used to show post under particular category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,049 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82462311,448
PHP6751211,070
CSS66423531

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity106.00
▷ Minimum class complexity106.00
▷ Maximum class complexity106.00
Average method complexity22.00
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
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
9 PNG files occupy 0.20MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-comment.png0.29KB0.30KB0.00%
images/next_prevarrw.png1.50KB0.51KB▼ 65.84%
images/last-right.png0.20KB0.19KB▼ 5.34%
screenshot-2.png82.06KB23.03KB▼ 71.94%
images/next.png1.15KB0.31KB▼ 72.67%