84% whatever-posts-widget

Code Review | Whatever Posts Widget

WordPress plugin Whatever Posts Widget scored 84% from 54 tests.

About plugin

  • Plugin page: whatever-posts-wi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 5.9.2
  • First release: Jul 8, 2019
  • Latest release: Jul 8, 2019
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: nashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Whatever Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0258.77 ▲7.10
Dashboard /wp-admin3.42 ▲0.0134.78 ▼1.94
Posts /wp-admin/edit.php3.65 ▲0.0139.09 ▼2.82
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.61 ▼1,245.95
Media Library /wp-admin/upload.php3.30 ▲0.0124.22 ▼2.14

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_whatever-posts-widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Whatever Posts Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2715.96 ▼0.005.91 ▼0.282.53 ▼0.46
Dashboard /wp-admin2,874 ▲166.01 ▼0.13127.95 ▼8.03205.38 ▲47.57
Posts /wp-admin/edit.php2,694 ▲33.23 ▼0.0062.93 ▲1.74137.80 ▼12.52
Add New Post /wp-admin/post-new.php1,661 ▼9116.60 ▼4.31429.05 ▼30.37160.27 ▼23.50
Media Library /wp-admin/upload.php1,698 ▼05.53 ▲0.02151.77 ▲1.91214.72 ▼20.68

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_whatever-posts-widget

Smoke tests 75% 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 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whatever-posts-widget/whatever-posts-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: widget, post, whatever posts widget, thumbnail, nashita

whatever-posts-widget/whatever-posts-widget.php 85% from 13 tests

The main PHP file in "Whatever Posts Widget" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("domain/path")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected168 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11110129
CSS12039

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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 files were detected