84% whatever-posts-widget

Code Review | Whatever Posts Widget

WordPress plugin Whatever Posts Widget scored84%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: 6.3.1
  • 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 /439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.58ms] Passed 4 tests

Analyzing server-side resources used by Whatever Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.43 ▼6.25
Dashboard /wp-admin3.35 ▲0.0144.37 ▼18.63
Posts /wp-admin/edit.php3.40 ▲0.0550.91 ▲1.79
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.67 ▼12.05
Media Library /wp-admin/upload.php3.27 ▲0.0533.73 ▼1.40

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_whatever-posts-widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Whatever Posts Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼0.991.58 ▼0.1537.59 ▼5.35
Dashboard /wp-admin2,209 ▲185.90 ▲0.87110.20 ▲2.7942.64 ▲3.78
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0539.42 ▲0.2135.73 ▼1.40
Add New Post /wp-admin/post-new.php1,533 ▲1423.19 ▼0.07639.30 ▼37.0054.42 ▲2.45
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0195.20 ▼2.7743.23 ▼0.15

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_whatever-posts-widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: whatever posts widget, thumbnail, widget, nashita, post

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
It is important to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("domain/path")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin168 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11110129
CSS12039

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin