77% wp-latest-posts

Code Review | WP Latest Posts

WordPress plugin WP Latest Posts scored 77% from 53 tests.

About plugin

  • Plugin page: wp-latest-posts
  • Plugin version: 4.8.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 5.8.1
  • First release: Dec 15, 2014
  • Latest release: Oct 11, 2021
  • Number of updates: 268
  • Update frequency: every 9.3 days
  • Top authors: JoomUnited (100%)

Code review

53 tests

User reviews

72 reviews

Install metrics

10,000+ active / 417,349 total downloads


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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.27MB] [CPU: ▼281.78ms] Passed 4 tests

Analyzing server-side resources used by WP Latest Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲1.3642.95 ▲20.77
Dashboard /wp-admin4.35 ▲1.3051.72 ▲7.60
Posts /wp-admin/edit.php4.40 ▲1.2949.59 ▲8.64
Add New Post /wp-admin/post-new.php6.65 ▲1.22109.01 ▼1,145.64
Media Library /wp-admin/upload.php4.29 ▲1.2840.56 ▲2.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 203 new files
Database: no new tables, 5 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Latest Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,696 ▲9016.28 ▲0.459.49 ▲0.5945.67 ▼0.23
Dashboard /wp-admin2,946 ▲965.89 ▲0.02134.74 ▲2.83104.34 ▲10.13
Posts /wp-admin/edit.php2,725 ▲222.69 ▼0.0063.02 ▼0.3492.25 ▲0.25
Add New Post /wp-admin/post-new.php1,618 ▲3021.65 ▼0.26263.05 ▼7.85133.39 ▲29.59
Media Library /wp-admin/upload.php1,714 ▼585.01 ▼0.00141.62 ▼40.69108.32 ▼19.63

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • has_views_count_post_meta_key
    • wplp_jufeedback_version
    • wplp_db_version
    • widget_wplp_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-latest-posts/requirements.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > 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 plugin_dir_url() in wp-content/plugins/wp-latest-posts/wp-latest-posts.php:44
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-latest-posts/inc/wplp-front.inc.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-latest-posts/inc/admin/views/tabs/shortcode.php:4
    • > 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/content-source.php:57
    • > 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:75
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/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 esc_html_e() in wp-content/plugins/wp-latest-posts/inc/admin/views/configuration.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5, #6, #7, #8 in wp-latest-posts/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

wp-latest-posts/wp-latest-posts.php 92% from 13 tests

The main PHP script in "WP Latest Posts" version 4.8.9 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin38,650 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 260)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity140.73
▷ Minimum class complexity10.00
▷ Maximum class complexity689.00
Average method complexity10.34
▷ Minimum method complexity1.00
▷ Maximum method complexity260.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
▷ Static methods5136.96%
▷ Public methods11381.88%
▷ Protected methods42.90%
▷ Private methods2115.22%
▷ Named functions218.18%
▷ Anonymous functions981.82%
▷ Global constants1651.61%
▷ Class constants1548.39%
▷ Public constants15100.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
37 PNG files occupy 0.61MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/wplp-logo-white.png3.71KB2.09KB▼ 43.58%
img/wplp-edit-icon.png1.00KB0.98KB▼ 2.43%
wordpress-css-framework/readme_img/notice.png19.65KB10.75KB▼ 45.31%