10% advanced-featured-page-widget

Code Review | Advanced Featured Page Widget

WordPress plugin Advanced Featured Page Widget scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-featured...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: Apr 23, 2013
  • Latest release: Apr 25, 2013
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: jmurimi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 13,785 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/advanced-featured-page-widget/advanced-featured-page-widget.php+349
    Function create_function() is deprecated

Server metrics [RAM: ▼1.76MB] [CPU: ▼194.69ms] Passed 4 tests

A check of server-side resources used by Advanced Featured Page Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼0.968.55 ▼13.51
Dashboard /wp-admin1.89 ▼1.173.70 ▼33.26
Posts /wp-admin/edit.php1.89 ▼1.223.76 ▼25.87
Add New Post /wp-admin/post-new.php1.89 ▼3.554.16 ▼700.75
Media Library /wp-admin/upload.php1.89 ▼1.114.14 ▼18.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Featured Page Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.99 ▲0.065.12 ▲0.0575.38 ▼0.19
Dashboard /wp-admin2,926 ▲276.11 ▼0.02116.46 ▼17.27171.25 ▼1.23
Posts /wp-admin/edit.php2,737 ▼63.24 ▲0.0261.94 ▼5.33138.90 ▼3.51
Add New Post /wp-admin/post-new.php3,640 ▼10315.37 ▼3.72412.79 ▼10.00158.22 ▼12.51
Media Library /wp-admin/upload.php1,752 ▲35.49 ▼0.02137.87 ▼13.92182.78 ▼3.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/advanced-featured-page-widget/advanced-featured-page-widget.php+349
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_advanced-featured-page-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-featured-page-widget/advanced-featured-page-widget.php:15

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: widgets, featured post, widget, featured page, featured post widget...

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

Analyzing the main PHP file in "Advanced Featured Page Widget" version 1.2
50 characters long description:
Add a featured page in the sidebar using a widget.

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
No dangerous file extensions were detected221 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
2 compressed PNG files occupy 0.05MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.60KB5.27KB▼ 5.88%
screenshot-2.png42.79KB41.79KB▼ 2.34%