84% category-posts-shortcode

Code Review | Category Posts Shortcode

WordPress plugin Category Posts Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: category-posts-sh...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 13, 2023
  • Latest release: Oct 31, 2023
  • Number of updates: 3
  • Update frequency: every 27.0 days
  • Top authors: punitpatelofficial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Category Posts Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.97 ▲4.14
Dashboard /wp-admin3.31 ▲0.0148.99 ▼4.32
Posts /wp-admin/edit.php3.36 ▲0.0145.81 ▲0.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.90 ▼16.32
Media Library /wp-admin/upload.php3.24 ▲0.0132.59 ▼1.54

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Category Posts Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.69 ▼0.031.65 ▼0.2045.87 ▼0.81
Dashboard /wp-admin2,198 ▲215.57 ▼0.0388.67 ▲1.5238.51 ▼5.28
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0536.98 ▲3.3931.85 ▲1.47
Add New Post /wp-admin/post-new.php1,534 ▼318.28 ▼0.13594.33 ▼54.4671.03 ▲6.24
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.1099.38 ▲3.9740.98 ▼4.41

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/category-posts-shortcode/category-posts-shortcode.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: posts, shortcode, category

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

This is the main PHP file of "Category Posts Shortcode" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
81 characters long description:
A simple plugin that adds a shortcode to display posts from a specified category.

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
Good job! No executable or dangerous file extensions detected110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS10077
PHP181833

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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