83% advance-widget-pack

Code Review | Advance Widget Pack

WordPress plugin Advance Widget Pack scored83%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: 6.3.1
  • 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,538 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.27MB] [CPU: ▼5.47ms] Passed 4 tests

Server-side resources used by Advance Widget Pack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3046.20 ▲3.12
Dashboard /wp-admin3.58 ▲0.2350.79 ▼13.17
Posts /wp-admin/edit.php3.69 ▲0.3356.48 ▲6.44
Add New Post /wp-admin/post-new.php6.16 ▲0.2785.53 ▼12.95
Media Library /wp-admin/upload.php3.50 ▲0.2738.69 ▲1.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 13 new options
New WordPress options
widget_author_bio
widget_awp_popular_post
widget_theysaidso_widget
widget_awp_author_list
widget_awp_recent_comments
widget_awp_feature_post
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_awp_recent_posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advance Widget Pack
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.27 ▼1.111.62 ▲0.0241.63 ▼1.55
Dashboard /wp-admin2,209 ▲185.91 ▲1.0298.01 ▼2.3339.65 ▼5.90
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0344.57 ▲9.1236.05 ▼0.82
Add New Post /wp-admin/post-new.php1,538 ▲1923.05 ▼0.33688.82 ▼6.8066.54 ▲3.92
Media Library /wp-admin/upload.php1,391 ▲64.13 ▼0.0699.13 ▼22.3146.52 ▼2.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 13 options
    • theysaidso_admin_options
    • widget_author_bio
    • widget_recent-posts
    • widget_awp_author_list
    • widget_awp_recent_posts
    • widget_awp_feature_post
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • ...

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 take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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-recent-post.php:2
    • > 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: 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-author-bio.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-recent-comments.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advance-widget-pack/awp-random-post.php:2

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 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #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: There are too many tags (15 tag instead of maximum 10)
You can take inspiration from this readme.txt

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: Even though not officially enforced, the main 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,031 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP82621988
CSS10043

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1058.82%
▷ Anonymous functions741.18%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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-1.png26.81KB10.34KB▼ 61.44%
screenshot-2.png8.19KB3.40KB▼ 58.49%
screenshot-5.png10.24KB4.20KB▼ 59.00%
screenshot-6.png15.66KB5.08KB▼ 67.60%
screenshot-4.png19.54KB6.30KB▼ 67.73%