68% jp-latest-posts-shortcode

Code Review | JP Latest Posts Shortcode

WordPress plugin JP Latest Posts Shortcode scored 68% from 54 tests.

About plugin

  • Plugin page: jp-latest-posts-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Jun 9, 2014
  • Latest release: Jun 23, 2015
  • Number of updates: 13
  • Update frequency: every 29.4 days
  • Top authors: Skjoy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 3,149 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.92ms] Passed 4 tests

Server-side resources used by JP Latest Posts Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.437.16 ▼33.23
Dashboard /wp-admin2.05 ▼1.266.19 ▼42.56
Posts /wp-admin/edit.php2.05 ▼1.317.38 ▼35.69
Add New Post /wp-admin/post-new.php2.05 ▼3.845.21 ▼92.18
Media Library /wp-admin/upload.php2.05 ▼1.185.15 ▼27.04
JP Latest Posts /wp-admin/options-general.php?page=latest_posts_settings2.055.98

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_jlp_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by JP Latest Posts Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.32 ▼1.301.62 ▼0.1142.86 ▼0.49
Dashboard /wp-admin2,212 ▲274.85 ▼1.00108.56 ▲4.3037.72 ▼14.46
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0038.33 ▲0.7333.36 ▲0.47
Add New Post /wp-admin/post-new.php1,533 ▲1223.16 ▲0.21660.90 ▲12.0452.85 ▼2.59
Media Library /wp-admin/upload.php1,394 ▲34.29 ▲0.0693.95 ▼2.5542.08 ▲1.12
JP Latest Posts /wp-admin/options-general.php?page=latest_posts_settings8422.0323.9625.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jp-lps-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_jlp_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=latest_posts_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jp-lps-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=latest_posts_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=latest_posts_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/jp-latest-posts-shortcode/lp-options.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/jp-latest-posts-shortcode/lp-options.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (JP Latest Posts Shortcode.), #2 (Output of the plugin.), #3 (Admin panel.)
The official readme.txt might help

jp-latest-posts-shortcode/jp-latest-posts-shortcode.php 92% from 13 tests

This is the main PHP file of "JP Latest Posts Shortcode" 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: Please don't use more than 140 characters for the plugin description (currently 272 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin202 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25841163
CSS16139

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
PNG images were not found in this plugin