84% wp-latest-posts-widget

Code Review | WP Latest Posts Widget

WordPress plugin WP Latest Posts Widget scored 84% from 54 tests.

About plugin

  • Plugin page: wp-latest-posts-w...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2019
  • Latest release: Jul 4, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: nashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 428 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
Installer ran successfully

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

Analyzing server-side resources used by WP Latest Posts Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.20 ▼7.54
Dashboard /wp-admin3.32 ▲0.0145.37 ▼5.90
Posts /wp-admin/edit.php3.37 ▲0.0145.39 ▼1.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.75 ▼11.74
Media Library /wp-admin/upload.php3.24 ▲0.0135.64 ▼1.40

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_wp-latest-posts-widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Latest Posts Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.29 ▼0.901.55 ▼0.5637.35 ▼10.21
Dashboard /wp-admin2,203 ▲125.75 ▲0.8492.98 ▼5.7837.02 ▼3.50
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0135.32 ▼9.0631.74 ▼3.06
Add New Post /wp-admin/post-new.php1,534 ▲1523.22 ▲0.23648.94 ▼19.2952.02 ▲2.58
Media Library /wp-admin/upload.php1,385 ▼64.20 ▲0.0296.54 ▼3.6542.37 ▼2.74

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_wp-latest-posts-widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× 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/wp-latest-posts-widget/wp-latest-posts-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: post, widget, thumbnail

wp-latest-posts-widget/wp-latest-posts-widget.php 85% from 13 tests

The main file in "WP Latest Posts Widget" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("domain/path")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 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 plugin92 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP191062
CSS10030

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin