84% flexible-posts-widget

Code Review | Flexible Posts Widget

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

About plugin

  • Plugin page: flexible-posts-wi...
  • Plugin version: 3.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 6.3.1
  • First release: Apr 20, 2012
  • Latest release: Dec 31, 2016
  • Number of updates: 192
  • Update frequency: every 8.9 days
  • Top authors: dpe415 (100%)

Code review

54 tests

User reviews

57 reviews

Install metrics

10,000+ active / 205,295 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.10MB] [CPU: ▼2.05ms] Passed 4 tests

Analyzing server-side resources used by Flexible Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.22 ▼1.30
Dashboard /wp-admin3.40 ▲0.0946.91 ▼0.30
Posts /wp-admin/edit.php3.51 ▲0.1647.95 ▲1.10
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.08 ▼7.71
Media Library /wp-admin/upload.php3.32 ▲0.0937.63 ▲2.68

Server storage [IO: ▲0.35MB] [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: 34 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
dpe_fp_widget_ver
widget_dpe_fp_widget
dpe_fp_widget_db_ver
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flexible Posts Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.29 ▼1.091.84 ▲0.1845.39 ▲0.82
Dashboard /wp-admin2,215 ▲244.87 ▼0.0197.32 ▼8.5039.70 ▼2.37
Posts /wp-admin/edit.php2,098 ▲62.08 ▲0.0542.25 ▲7.4237.46 ▲6.90
Add New Post /wp-admin/post-new.php1,523 ▼1017.48 ▼5.99629.24 ▲21.0260.80 ▲8.82
Media Library /wp-admin/upload.php1,394 ▲34.24 ▲0.02102.40 ▲3.5144.77 ▼1.72

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 9 options in the database
    • dpe_fp_widget_db_ver
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_dpe_fp_widget
    • dpe_fp_widget_ver

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/flexible-posts-widget/views/default.php
    • > /wp-content/plugins/flexible-posts-widget/views/admin.php
    • > /wp-content/plugins/flexible-posts-widget/views/widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (In the wild: FPW displaying several posts over at http://chnl7700.mnsu.edu. Also highly customized output and theme styles.) image missing
You can take inspiration from this readme.txt

flexible-posts-widget/flexible-posts-widget.php 92% from 13 tests

"Flexible Posts Widget" version 3.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,456 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP7221495616
PO File5207237512
Markdown1530155
CSS21762
JavaScript2151759
Sass113052

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity25.67
▷ Minimum class complexity9.00
▷ Maximum class complexity55.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png47.19KB45.31KB▼ 3.97%
screenshot-2.png23.25KB22.22KB▼ 4.45%
screenshot-6.png16.76KB15.53KB▼ 7.35%
screenshot-5.png61.09KB59.51KB▼ 2.60%
screenshot-1.png20.27KB19.27KB▼ 4.98%