84% awesome-featured-post-widget

Code Review | Awesome Featured Post Widget

WordPress plugin Awesome Featured Post Widget scored84%from 54 tests.

About plugin

  • Plugin page: awesome-featured-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.7.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2016
  • Latest release: Mar 14, 2017
  • Number of updates: 39
  • Update frequency: every 7.1 days
  • Top authors: accreteinfosolution (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,000 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼7.32ms] Passed 4 tests

A check of server-side resources used by Awesome Featured Post Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1645.00 ▼5.22
Dashboard /wp-admin3.50 ▲0.1248.36 ▼17.37
Posts /wp-admin/edit.php3.62 ▲0.2249.19 ▼5.47
Add New Post /wp-admin/post-new.php6.10 ▲0.1896.23 ▼1.22
Media Library /wp-admin/upload.php3.43 ▲0.1639.40 ▲1.94

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

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

Browser metrics Passed 4 tests

Awesome Featured Post Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.63 ▼0.7211.07 ▲8.5842.02 ▲0.53
Dashboard /wp-admin2,197 ▲205.60 ▲0.0085.53 ▼13.0339.04 ▼3.44
Posts /wp-admin/edit.php2,102 ▲22.01 ▼0.1533.91 ▼2.8033.61 ▼5.58
Add New Post /wp-admin/post-new.php1,528 ▲223.58 ▲0.27667.99 ▼28.0965.78 ▲7.37
Media Library /wp-admin/upload.php1,402 ▲24.20 ▲0.11110.17 ▼7.9348.66 ▲0.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_mfpw-widget
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-featured-post-widget/includes/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/awesome-featured-post-widget/includes/functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/awesome-featured-post-widget/includes/shortcode.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: category, widget, slider, tags, thumbnails...

awesome-featured-post-widget/awesome-featured-post-widget.php Passed 13 tests

The entry point to "Awesome Featured Post Widget" version 1.2 is a PHP file that has certain tags in its header comment area
71 characters long description:
Easily to display Awesome Featured Post Widget via shortcode or widget.

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
There were no executable files found in this plugin2,944 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP74102301,457
JavaScript2227301,359
CSS2272128

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity27.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.47MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin screen shots/ScreenShot5.png116.09KB37.13KB▼ 68.02%
plugin screen shots/ScreenShot4.PNG30.34KB9.62KB▼ 68.28%
plugin screen shots/ScreenShot3.png115.55KB32.17KB▼ 72.16%
plugin screen shots/ScreenShot2.PNG134.61KB40.21KB▼ 70.13%
plugin screen shots/ScreenShot1.png84.68KB31.54KB▼ 62.75%