84% shortcode-query-posts-by-selected-category

Code Review | Shortcode Query Posts By Selected Category

WordPress plugin Shortcode Query Posts By Selected Category scored 84% from 54 tests.

About plugin

  • Plugin page: shortcode-query-p...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2013
  • Latest release: Nov 14, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: suifengtec (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,078 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
Installer ran successfully

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

A check of server-side resources used by Shortcode Query Posts By Selected Category
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.21 ▼3.54
Dashboard /wp-admin3.31 ▲0.0146.95 ▼5.36
Posts /wp-admin/edit.php3.36 ▲0.0143.94 ▼10.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.88 ▼15.71
Media Library /wp-admin/upload.php3.24 ▲0.0136.78 ▲3.67

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Shortcode Query Posts By Selected Category
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.164.39 ▲2.7640.14 ▼8.73
Dashboard /wp-admin2,206 ▲185.91 ▲1.00117.08 ▲17.2046.31 ▲1.31
Posts /wp-admin/edit.php2,086 ▼02.03 ▼0.0133.87 ▼3.0434.55 ▲0.23
Add New Post /wp-admin/post-new.php1,534 ▲2023.42 ▲5.85667.61 ▲28.9863.44 ▲6.81
Media Library /wp-admin/upload.php1,391 ▲34.30 ▲0.0193.81 ▼2.0640.77 ▼0.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcode-query-posts-by-selected-category/shortcode-query-posts-by-selected-category.php:54

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: shortcode, category

shortcode-query-posts-by-selected-category/shortcode-query-posts-by-selected-category.php 92% from 13 tests

This is the main PHP file of "Shortcode Query Posts By Selected Category" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111935

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin