10% advanced-iranian-widget

Code Review | Advanced Iranian Widget

WordPress plugin Advanced Iranian Widget scored10%from 54 tests.

About plugin

  • Plugin page: advanced-iranian-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2012
  • Latest release: Feb 9, 2012
  • Number of updates: 10
  • Update frequency: every 4.1 days
  • Top authors: towhidn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,833 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/advanced-iranian-widget/Advanced-Iranian-Widget.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedIranianWidget has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼59.25ms] Passed 4 tests

A check of server-side resources used by Advanced Iranian Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.294.78 ▼34.31
Dashboard /wp-admin2.19 ▼1.115.94 ▼61.27
Posts /wp-admin/edit.php2.19 ▼1.166.29 ▼46.15
Add New Post /wp-admin/post-new.php2.19 ▼3.705.67 ▼95.28
Media Library /wp-admin/upload.php2.19 ▼1.045.42 ▼33.17

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_advancediranianwidget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Iranian Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.34 ▼0.041.67 ▲0.1440.66 ▼5.22
Dashboard /wp-admin2,208 ▲285.64 ▲0.0690.54 ▼1.1141.20 ▲0.77
Posts /wp-admin/edit.php2,116 ▲131.97 ▲0.0139.17 ▲3.7340.71 ▲4.78
Add New Post /wp-admin/post-new.php1,541 ▲323.04 ▲4.76652.70 ▼29.5055.34 ▼30.96
Media Library /wp-admin/upload.php1,410 ▲74.21 ▲0.04104.43 ▲0.7744.31 ▲0.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/advanced-iranian-widget/Advanced-Iranian-Widget.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedIranianWidget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_advancediranianwidget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-iranian-widget/Advanced-Iranian-Widget.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Tags: There are too many tags (21 tag instead of maximum 10)
You can take inspiration from this readme.txt

advanced-iranian-widget/Advanced-Iranian-Widget.php 85% from 13 tests

The main PHP file in "Advanced Iranian Widget" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 207 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-iranian-widget.php" instead of "Advanced-Iranian-Widget.php")

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
There were no executable files found in this plugin211 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12959154
PO File1212057

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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 images were found in this plugin