84% ah-display-widgets

Code Review | AH Display Widgets

WordPress plugin AH Display Widgets scored84%from 54 tests.

About plugin

  • Plugin page: ah-display-widgets
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.0
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Oct 29, 2018
  • Number of updates: 27
  • Update frequency: every 14.8 days
  • Top authors: AHecht (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active /66,180 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.39ms] Passed 4 tests

A check of server-side resources used by AH Display Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.50 ▲9.13
Dashboard /wp-admin3.44 ▲0.1044.00 ▼11.82
Posts /wp-admin/edit.php3.56 ▲0.2047.41 ▲2.64
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.34 ▼7.53
Media Library /wp-admin/upload.php3.37 ▲0.1436.31 ▲3.15

Server storage [IO: ▲0.10MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

AH Display Widgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.61 ▲0.251.81 ▲0.2242.38 ▲4.69
Dashboard /wp-admin2,198 ▲175.61 ▼0.1090.15 ▼6.5141.42 ▼1.00
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0439.73 ▲0.7135.75 ▲1.77
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▲0.05626.32 ▼10.7057.42 ▲1.15
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0694.32 ▼6.6741.98 ▼2.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× 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/ah-display-widgets/ah-display-widgets.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can take inspiration from this readme.txt

ah-display-widgets/ah-display-widgets.php 92% from 13 tests

This is the main PHP file of "AH Display Widgets" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,796 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PO File194228121,215

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.71
Average class complexity87.50
▷ Minimum class complexity3.00
▷ Maximum class complexity172.00
Average method complexity9.24
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected