83% advance-widget-pack

Code Review | Advance Widget Pack

WordPress plugin Advance Widget Pack scored 83% from 54 tests.

About plugin

  • Plugin page: advance-widget-pack
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-5.7.0
  • WordPress version: 5.9.2
  • First release: Aug 30, 2014
  • Latest release: Feb 9, 2021
  • Number of updates: 25
  • Update frequency: every 94.2 days
  • Top authors: saumya010 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 3,229 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼291.14ms] Passed 4 tests

Server-side resources used by Advance Widget Pack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3456.45 ▲4.39
Dashboard /wp-admin3.69 ▲0.2834.81 ▲2.08
Posts /wp-admin/edit.php3.91 ▲0.2739.21 ▲1.46
Add New Post /wp-admin/post-new.php7.15 ▲0.1894.22 ▼1,168.60
Media Library /wp-admin/upload.php3.56 ▲0.2725.46 ▲0.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advance Widget Pack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲715.90 ▲0.165.88 ▲0.092.50 ▼0.19
Dashboard /wp-admin2,895 ▲376.15 ▼0.05114.02 ▼20.39156.44 ▼7.45
Posts /wp-admin/edit.php2,688 ▼33.23 ▼0.0063.79 ▼0.33142.08 ▲2.17
Add New Post /wp-admin/post-new.php1,779 ▲8922.11 ▲1.38455.46 ▲6.83162.37 ▲4.51
Media Library /wp-admin/upload.php1,698 ▼05.48 ▼0.04145.18 ▲11.95192.05 ▲1.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_awp_feature_post
    • widget_awp_author_list
    • widget_author_bio
    • widget_awp_random_posts
    • widget_awp_popular_post
    • widget_awp_recent_posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-feature-post.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-recent-comments.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-widget-pack/plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-random-post.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-recent-post.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-popular-post.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-author-list.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-author-bio.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Author Details widget.), #2 (Author List widget.), #3 (Featured Post widget.), #4 (Popular Post widget.), #5 (Recent Comments widget.), #6 (Recent Posts widget.)
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

advance-widget-pack/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Advance Widget Pack" version 1.0.7
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advance-widget-pack.php" instead of "plugin.php")

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 plugin1,031 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity14.86
▷ Minimum class complexity5.00
▷ Maximum class complexity26.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1058.82%
▷ Anonymous functions741.18%
▷ Global constants00.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.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png10.24KB4.20KB▼ 59.00%
screenshot-6.png15.66KB5.08KB▼ 67.60%
screenshot-3.png19.86KB6.51KB▼ 67.20%
screenshot-2.png8.19KB3.40KB▼ 58.49%
screenshot-1.png26.81KB10.34KB▼ 61.44%