84% display-category-posts-via-shortcode-lite

Code Review | Display Category Posts Via Shortcode Lite

WordPress plugin Display Category Posts Via Shortcode Lite scored84%from 54 tests.

About plugin

  • Plugin page: display-category-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: Aug 28, 2015
  • Number of updates: 19
  • Update frequency: every 10.8 days
  • Top authors: vk011 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,394 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.33MB] [CPU: ▼8.91ms] Passed 4 tests

A check of server-side resources used by Display Category Posts Via Shortcode Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.74 ▼35.00
Dashboard /wp-admin3.32 ▲0.0245.99 ▼6.88
Posts /wp-admin/edit.php3.38 ▲0.0249.86 ▲4.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.73 ▲8.46
Media Library /wp-admin/upload.php3.25 ▲0.0235.52 ▲1.51
DCP Lite /wp-admin/options-general.php?page=dcp-lite3.2128.83

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Display Category Posts Via Shortcode Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.95 ▼0.448.19 ▲6.3837.70 ▼12.55
Dashboard /wp-admin2,207 ▲194.87 ▼1.03106.96 ▼14.1142.37 ▼4.70
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0439.98 ▲3.1835.16 ▼2.08
Add New Post /wp-admin/post-new.php1,517 ▼517.49 ▼5.63671.18 ▲6.3159.19 ▲7.20
Media Library /wp-admin/upload.php1,389 ▲74.19 ▼0.0798.64 ▲0.7945.63 ▼0.65
DCP Lite /wp-admin/options-general.php?page=dcp-lite1,0342.0524.8939.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please fix the following items
  • 4× 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/display-category-posts-via-shortcode-lite/ospl.php:3
    • > PHP Warning
      require(WP_CONTENT_DIR/plugins/display-category-posts-via-shortcode-lite/ospl.php): failed to open stream: No such file or directory in wp-content/plugins/display-category-posts-via-shortcode-lite/dcplite.php on line 13
    • > PHP Fatal error
      require(): Failed opening required 'WP_CONTENT_DIR/plugins/display-category-posts-via-shortcode-lite/ospl.php' (include_path='.:/usr/share/php') in wp-content/plugins/display-category-posts-via-shortcode-lite/dcplite.php on line 13
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/display-category-posts-via-shortcode-lite/dcplite.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

display-category-posts-via-shortcode-lite/dcplite.php 92% from 13 tests

The principal PHP file in "Display Category Posts Via Shortcode Lite" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("display-category-posts-via-shortcode-lite.php" instead of "dcplite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,497 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS16136,313
PHP2589184

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin