78% weart-category-posts-widget

Code Review | Weart Category Posts Widget

WordPress plugin Weart Category Posts Widget scored 78% from 54 tests.

About plugin

  • Plugin page: weart-category-po...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.3
  • WordPress version: 5.8.1
  • First release: Jan 18, 2019
  • Latest release: Jan 21, 2019
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: weartstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 2,525 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼139.68ms] Passed 4 tests

A check of server-side resources used by Weart Category Posts Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0532.49 ▼2.20
Dashboard /wp-admin3.11 ▲0.0546.77 ▲1.21
Posts /wp-admin/edit.php3.16 ▲0.0563.50 ▲18.81
Add New Post /wp-admin/post-new.php5.46 ▲0.0389.57 ▼554.86
Media Library /wp-admin/upload.php3.05 ▲0.0532.24 ▼2.88

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
widget_weart_featured_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Weart Category Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲10916.01 ▲0.3213.17 ▲1.7349.15 ▲0.45
Dashboard /wp-admin2,970 ▲365.88 ▼0.09167.47 ▲11.40129.59 ▲24.67
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0280.36 ▲9.0292.30 ▲8.04
Add New Post /wp-admin/post-new.php1,672 ▼1,90518.81 ▲3.79391.22 ▼86.15106.12 ▲2.57
Media Library /wp-admin/upload.php1,810 ▲35.05 ▲0.04154.40 ▲2.55117.51 ▲5.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_weart_featured_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 no errors were found, this is by no means 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/weart-category-posts-widget/weart-category-posts-widget.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/weart-category-posts-widget/inc/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: The official readme.txt might help

weart-category-posts-widget/weart-category-posts-widget.php Passed 13 tests

"Weart Category Posts Widget" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
Display the latest posts with the most beautiful way from the picked category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin381 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32654209
Sass1102271
CSS11859
PO File1131342

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin