10% fancy-posts-widget

Code Review | Fancy Posts Widget

WordPress plugin Fancy Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: fancy-posts-widget
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2013
  • Latest release: Nov 17, 2013
  • Number of updates: 20
  • Update frequency: every 0.8 days
  • Top authors: Mazinger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,611 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/fancy-posts-widget/fancy-posts-widget.php+229
    syntax error, unexpected '?>
    ', expecting function (T_FUNCTION) or const (T_CONST)

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

An overview of server-side resources used by Fancy Posts Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0051.49 ▲7.10
Dashboard /wp-admin3.31 ▼0.0451.20 ▼16.91
Posts /wp-admin/edit.php3.36 ▲0.0051.72 ▼1.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.42 ▼21.82
Media Library /wp-admin/upload.php3.23 ▲0.0042.89 ▲0.36

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fancy Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼0.972.10 ▲0.2943.31 ▼0.79
Dashboard /wp-admin2,206 ▲155.91 ▲1.04106.92 ▲0.8043.18 ▼0.28
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0441.77 ▲2.1534.59 ▼2.26
Add New Post /wp-admin/post-new.php1,533 ▲1223.31 ▲0.31673.12 ▼7.6251.42 ▲0.64
Media Library /wp-admin/upload.php1,388 ▼04.24 ▼0.01100.60 ▼22.8944.75 ▼3.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected '?>\r', expecting function (T_FUNCTION) or const (T_CONST) in wp-content/plugins/fancy-posts-widget/fancy-posts-widget.php on line 229

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 require attention:
  • Screenshots: Please add an image for screenshot #1 (Widget options)
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

fancy-posts-widget/fancy-posts-widget.php Passed 13 tests

The entry point to "Fancy Posts Widget" version 1.4 is a PHP file that has certain tags in its header comment area
40 characters long description:
Another posts widget with many features.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin208 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11220208

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.73KB5.86KB▼ 57.32%