84% a-featured-page-widget

Code Review | A Featured Page Widget

WordPress plugin A Featured Page Widget scored84%from 54 tests.

About plugin

  • Plugin page: a-featured-page-w...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Jun 6, 2013
  • Latest release: Oct 30, 2015
  • Number of updates: 16
  • Update frequency: every 54.8 days
  • Top authors: eduardozulian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,547 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 gracefully, with no errors

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

An overview of server-side resources used by A Featured Page Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.86 ▼3.84
Dashboard /wp-admin3.32 ▲0.0144.25 ▼1.62
Posts /wp-admin/edit.php3.37 ▲0.0144.85 ▲0.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.81 ▲4.13
Media Library /wp-admin/upload.php3.24 ▲0.0135.43 ▲3.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_a_featured_page_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A Featured Page Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.35 ▼0.281.72 ▲0.2239.23 ▼0.87
Dashboard /wp-admin2,198 ▲215.64 ▲0.0683.35 ▼3.1237.37 ▼3.92
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0136.18 ▲0.2833.38 ▼2.66
Add New Post /wp-admin/post-new.php1,526 ▼023.52 ▲0.28581.51 ▼95.6573.53 ▲15.17
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.05101.17 ▼2.6042.59 ▼3.46

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_a_featured_page_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a-featured-page-widget/a-featured-page-widget.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: widget, pages, page widget, sidebar, featured page

a-featured-page-widget/a-featured-page-widget.php Passed 13 tests

"A Featured Page Widget" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Feature a page and display its excerpt and post thumbnail.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin247 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13358134
Markdown126071
PO File1141238
CSS1014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin