77% wp-latest-posts

Code Review | WP Latest Posts

WordPress plugin WP Latest Posts scored77%from 54 tests.

About plugin

  • Plugin page: wp-latest-posts
  • Plugin version: 5.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Dec 15, 2014
  • Latest release: Nov 9, 2023
  • Number of updates: 282
  • Update frequency: every 11.5 days
  • Top authors: JoomUnited (100%)

Code review

54 tests

User reviews

79 reviews

Install metrics

10,000+ active /509,868 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: ▲1.75MB] [CPU: ▲10.58ms] Passed 4 tests

Analyzing server-side resources used by WP Latest Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.19 ▲1.7252.91 ▲15.55
Dashboard /wp-admin5.07 ▲1.7658.97 ▲9.75
Posts /wp-admin/edit.php5.12 ▲1.7662.96 ▲15.39
Add New Post /wp-admin/post-new.php7.67 ▲1.7899.68 ▲1.61
Media Library /wp-admin/upload.php4.99 ▲1.7649.10 ▲18.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 296 new files
Database: no new tables, 11 new options
New WordPress options
widget_wplp_widget
wplp_jureview_installation_time
can_compress_scripts
wplp_db_version
db_upgraded
has_views_count_post_meta_key
wplp_jufeedback_version
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Latest Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5114.25 ▼0.431.75 ▲0.1940.94 ▲1.15
Dashboard /wp-admin2,216 ▲415.67 ▲0.0588.73 ▼12.1741.15 ▼1.65
Posts /wp-admin/edit.php2,121 ▲212.03 ▲0.0339.99 ▼1.0734.01 ▼2.62
Add New Post /wp-admin/post-new.php6,396 ▲4,87027.89 ▲4.74823.29 ▲190.5238.64 ▼22.48
Media Library /wp-admin/upload.php1,418 ▲184.28 ▲0.1096.43 ▼11.1542.08 ▼4.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-posts
    • widget_wplp_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • wplp_jufeedback_version
    • widget_recent-comments
    • db_upgraded
    • wplp_db_version
    • has_views_count_post_meta_key

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-latest-posts/inc/builder/avada/wplp-avada.php
    • > /wp-content/plugins/wp-latest-posts/requirements.php
    • > /wp-content/plugins/wp-latest-posts/inc/builder/bakery/wplp-bakery.php
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/wp-latest-posts/inc/builder/divi/includes/modules/WplpDivi/WplpDivi.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/wp-latest-posts/inc/builder/divi/includes/WplpDivi.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-latest-posts/inc/admin/views/tabs/content-source.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-latest-posts/inc/builder/divi/wplp-divi.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-latest-posts/inc/admin/views/tabs/bottom-form.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-latest-posts/inc/admin/views/tabs/shortcode.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-latest-posts/inc/wplp-front.inc.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-latest-posts/inc/install.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-latest-posts/inc/admin/views/tabs/theme.php:121
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-latest-posts/inc/admin/views/tabs/image-source.php:5

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 93% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6, #7, #8 in wp-latest-posts/assets to your readme.txt
You can look at the official readme.txt

wp-latest-posts/wp-latest-posts.php Passed 13 tests

The main file in "WP Latest Posts" v. 5.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
41 characters long description:
Advanced frontpage and widget news slider

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin74,134 lines of code in 171 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript583,8541,96322,746
JSON20019,418
PHP331,1622,64112,088
CSS381,44167411,307
SVG29046,200
JSX3124511,002
HTML5860640
Markdown22750608
Sass1250125

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 277)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity115.71
▷ Minimum class complexity1.00
▷ Maximum class complexity890.00
Average method complexity11.27
▷ Minimum method complexity1.00
▷ Maximum method complexity277.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods161
▷ Static methods5232.30%
▷ Public methods13181.37%
▷ Protected methods74.35%
▷ Private methods2314.29%
Functions20
▷ Named functions1155.00%
▷ Anonymous functions945.00%
Constants33
▷ Global constants1751.52%
▷ Class constants1648.48%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
37 PNG files occupy 0.61MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/wplp-logo.png6.71KB3.37KB▼ 49.86%
img/wplp-edit-icon.png1.00KB0.98KB▼ 2.43%
css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
img/icon-notification.png0.77KB0.55KB▼ 27.74%
img/default-image-fpnp.png1.49KB1.64KB0.00%