78% advanced-text-widget

Code Review | Advanced Text Widget

WordPress plugin Advanced Text Widget scored 78% from 54 tests.

About plugin

  • Plugin page: advanced-text-widget
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.8
  • WordPress version: 5.9.2
  • First release: Jun 23, 2009
  • Latest release: Sep 23, 2018
  • Number of updates: 60
  • Update frequency: every 56.3 days
  • Top authors: maxchirkov (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

7,000+ active / 138,522 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.16MB] [CPU: ▼306.60ms] Passed 4 tests

Analyzing server-side resources used by Advanced Text Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.2953.12 ▼1.47
Dashboard /wp-admin3.42 ▲0.0121.25 ▼11.60
Posts /wp-admin/edit.php3.54 ▼0.1023.89 ▼11.61
Add New Post /wp-admin/post-new.php6.27 ▼0.7178.35 ▼1,201.07
Media Library /wp-admin/upload.php3.45 ▲0.1522.52 ▼2.10
ATW Plugin /wp-admin/options-general.php?page=atw3.5325.29

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Text Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,835 ▲9115.61 ▼0.106.46 ▲0.452.33 ▲0.04
Dashboard /wp-admin2,931 ▲736.10 ▼0.02116.11 ▼18.48164.96 ▲5.23
Posts /wp-admin/edit.php2,725 ▲343.24 ▲0.0062.25 ▲1.07141.20 ▲1.00
Add New Post /wp-admin/post-new.php1,787 ▲12623.03 ▲7.38407.83 ▼28.28157.26 ▲1.59
Media Library /wp-admin/upload.php1,737 ▲365.52 ▲0.01141.68 ▲3.55189.73 ▲3.63
ATW Plugin /wp-admin/options-general.php?page=atw2,0314.75112.56130.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • widget_advanced_text
    • atw

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/advanced-text-widget/advancedtext.php:24
    • > PHP Fatal error
      require_once(): Failed opening required 'ATW_LIB/wp_plugin_admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-text-widget/options/options.php on line 3
    • > PHP Warning
      Use of undefined constant ATW_LIB - assumed 'ATW_LIB' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-text-widget/options/options.php on line 3
    • > PHP Warning
      require_once(ATW_LIB/wp_plugin_admin.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-text-widget/options/options.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=atw
    • > Network (severe)
    wp-content/plugins/advanced-text-widget/js/min/scripts.min.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=atw
    • > Network (severe)
    http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/jquery.ui.all.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)


Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: php, plugin, conditions, widget, text...

advanced-text-widget/advancedtext.php 85% from 13 tests

The entry point to "Advanced Text Widget" version 2.1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-text-widget.php" instead of "advancedtext.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 233 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,372 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File27079172

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity51.33
▷ Minimum class complexity9.00
▷ Maximum class complexity128.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.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
PNG images were not found in this plugin