10% fancy-latest-post-widget

Code Review | Fancy Latest Post Widget

WordPress plugin Fancy Latest Post Widget scored10%from 54 tests.

About plugin

  • Plugin page: fancy-latest-post...
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2.3
  • WordPress version: 6.3.1
  • First release: Jul 15, 2015
  • Latest release: Aug 3, 2015
  • Number of updates: 23
  • Update frequency: every 0.9 days
  • Top authors: Juan_Mojica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,712 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/fancy-latest-post-widget/includes/fancy_latest_post_widget.php+283
    Function create_function() is deprecated

Server metrics [RAM: ▼1.83MB] [CPU: ▼52.95ms] Passed 4 tests

An overview of server-side resources used by Fancy Latest Post Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.305.75 ▼34.57
Dashboard /wp-admin2.19 ▼1.166.33 ▼50.85
Posts /wp-admin/edit.php2.19 ▼1.176.95 ▼39.38
Add New Post /wp-admin/post-new.php2.19 ▼3.705.77 ▼87.01
Media Library /wp-admin/upload.php2.19 ▼1.045.76 ▼29.65

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_fancy_latest_post_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Fancy Latest Post Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.64 ▲0.062.37 ▲0.5435.62 ▼5.08
Dashboard /wp-admin2,201 ▲235.67 ▼0.0588.46 ▼17.8536.43 ▼0.32
Posts /wp-admin/edit.php2,106 ▲272.03 ▲0.0435.09 ▼1.5431.61 ▼2.77
Add New Post /wp-admin/post-new.php1,531 ▲523.03 ▼0.55583.43 ▼38.4457.69 ▼12.34
Media Library /wp-admin/upload.php1,403 ▼04.14 ▼0.07106.45 ▲6.1148.40 ▲6.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/fancy-latest-post-widget/includes/fancy_latest_post_widget.php+283
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_fancy_latest_post_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fancy-latest-post-widget/fancy_latest_post.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fancy-latest-post-widget/includes/fancy_latest_post_widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings Page:
    ), #2 (Sidebar View:
    ), #3 (Content View:
    )
The official readme.txt might help

fancy-latest-post-widget/fancy_latest_post.php 85% from 13 tests

The main file in "Fancy Latest Post Widget" v. 1.3.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fancy-latest-post-widget.php" instead of "fancy_latest_post.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 209 characters long)

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
No dangerous file extensions were detected8,731 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS53801766,673
JavaScript5303971,771
PHP23327278
HTML1309

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/no_img.png2.53KB2.49KB▼ 1.58%
jscolor/hs.png2.62KB7.54KB0.00%
jscolor/hv.png2.80KB7.32KB0.00%