84% featured-posts-widget-for-extra-theme

Code Review | Featured Posts Widget for Extra Theme

WordPress plugin Featured Posts Widget for Extra Theme scored84%from 54 tests.

About plugin

  • Plugin page: featured-posts-wi...
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 19, 2018
  • Latest release: Jul 26, 2018
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: robertwalaski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /544 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.39ms] Passed 4 tests

An overview of server-side resources used by Featured Posts Widget for Extra Theme
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.07 ▼0.83
Dashboard /wp-admin3.34 ▼0.0050.16 ▼17.88
Posts /wp-admin/edit.php3.39 ▲0.0445.48 ▼5.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.67 ▼13.50
Media Library /wp-admin/upload.php3.26 ▲0.0436.69 ▲0.68

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_featured_posts_widget_for_extra_theme
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Featured Posts Widget for Extra Theme
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.28 ▼0.041.77 ▼0.2844.96 ▲2.28
Dashboard /wp-admin2,200 ▲205.63 ▲0.0096.44 ▲1.2742.22 ▲0.92
Posts /wp-admin/edit.php2,102 ▲21.99 ▼0.0238.53 ▼2.5434.16 ▼6.21
Add New Post /wp-admin/post-new.php1,530 ▲422.95 ▼0.10642.76 ▼53.6258.00 ▲3.88
Media Library /wp-admin/upload.php1,402 ▲24.23 ▲0.0299.95 ▲1.6841.90 ▼5.75

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_featured_posts_widget_for_extra_theme
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/featured-posts-widget-for-extra-theme/featured-posts-for-extra-theme-widget.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Requires at least: Invalid version format
You can look at the official readme.txt

featured-posts-widget-for-extra-theme/featured-posts-for-extra-theme-widget.php 92% from 13 tests

The main file in "Featured Posts Widget for Extra Theme" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("featured-posts-widget-for-extra-theme.php" instead of "featured-posts-for-extra-theme-widget.php")

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
No dangerous file extensions were detected138 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13326133
CSS1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity15.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin