94% add-widget-after-content

Code Review | Add Widget After Content

WordPress plugin Add Widget After Content scored 94% from 54 tests.

About plugin

  • Plugin page: add-widget-after-...
  • Plugin version: 2.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 5.9.2
  • First release: Jun 30, 2014
  • Latest release: Feb 3, 2022
  • Number of updates: 66
  • Update frequency: every 42.0 days
  • Top authors: apintop (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

10,000+ active / 90,641 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Add Widget After Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0953.57 ▲1.83
Dashboard /wp-admin3.44 ▲0.0434.28 ▼6.46
Posts /wp-admin/edit.php3.67 ▲0.0337.89 ▼1.65
Add New Post /wp-admin/post-new.php6.91 ▼0.0696.06 ▼1,192.01
Media Library /wp-admin/upload.php3.32 ▲0.0324.22 ▼1.49
Widget After Content /wp-admin/themes.php?page=awac-options3.3425.14
Menus /wp-admin/nav-menus.php3.7933.68
Widgets /wp-admin/widgets.php5.1750.88

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 2 new options
New WordPress options
awac_priority
awac_extensions

Browser metrics Passed 4 tests

An overview of browser requirements for Add Widget After Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,786 ▲3216.21 ▲0.196.95 ▲0.402.37 ▼0.75
Dashboard /wp-admin2,907 ▲536.09 ▼0.12113.82 ▼24.39154.04 ▼7.82
Posts /wp-admin/edit.php2,672 ▼163.24 ▲0.0162.67 ▼0.83141.17 ▼7.86
Add New Post /wp-admin/post-new.php1,701 ▲4017.18 ▲1.14411.97 ▼18.12169.36 ▲14.60
Media Library /wp-admin/upload.php1,707 ▲65.44 ▼0.08140.77 ▲1.23187.47 ▲2.84
Widget After Content /wp-admin/themes.php?page=awac-options1,2362.3855.43115.30
Menus /wp-admin/nav-menus.php2,2523.4381.99125.29
Widgets /wp-admin/widgets.php2,48424.16552.50140.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/add-widget-after-content/partials/awac-options-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: widget, posts

add-widget-after-content/add-widget-after-content.php 92% from 13 tests

The entry point to "Add Widget After Content" version 2.4.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,323 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64324411,054
PO File39096269

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity53.00
▷ Minimum class complexity13.00
▷ Maximum class complexity92.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods50
▷ Static methods36.00%
▷ Public methods4488.00%
▷ Protected methods00.00%
▷ Private methods612.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/awac-comments.png8.40KB3.81KB▼ 54.68%
images/awac-styles.png15.40KB6.47KB▼ 58.01%
images/awac-plus.png11.10KB5.22KB▼ 52.96%
images/awac-controls.png12.12KB5.13KB▼ 57.70%