10% identifying-iranians

Code Review | Identifying Iranians

WordPress plugin Identifying Iranians scored10%from 54 tests.

About plugin

  • Plugin page: identifying-iranians
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Dec 28, 2012
  • Latest release: Dec 28, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: vahidd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /847 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/identifying-iranians/vahidd_widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; IranianWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.68ms] Passed 4 tests

Server-side resources used by Identifying Iranians
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.82 ▼37.68
Dashboard /wp-admin2.10 ▼1.206.12 ▼45.85
Posts /wp-admin/edit.php2.10 ▼1.265.74 ▼45.75
Add New Post /wp-admin/post-new.php2.10 ▼3.797.08 ▼81.45
Media Library /wp-admin/upload.php2.10 ▼1.135.95 ▼31.22
افزونه ایرانیان /wp-admin/tools.php?page=Iranian2.106.04

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_iranianwidget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Identifying Iranians: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.35 ▼0.211.85 ▲0.1141.49 ▼6.10
Dashboard /wp-admin2,202 ▲255.60 ▲0.0191.91 ▲0.6346.04 ▲1.58
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0139.90 ▼0.8740.62 ▲3.15
Add New Post /wp-admin/post-new.php1,529 ▲323.39 ▼0.05666.34 ▼25.5964.59 ▲9.45
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.0397.93 ▼6.1546.29 ▲0.96
افزونه ایرانیان /wp-admin/tools.php?page=Iranian7962.1425.4948.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/identifying-iranians/vahidd_widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; IranianWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_iranianwidget
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=Iranian
    • > Deprecated in wp-content/plugins/identifying-iranians/vahidd_widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; IranianWidget has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=Iranian
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in IranianWidget is deprecated since version 4.3.0! Use __construct() instead.

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 fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/identifying-iranians/iranian_identification.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/identifying-iranians/vahidd_widget.php:15
    • > PHP Notice
      Undefined variable: geodbfile in wp-content/plugins/identifying-iranians/base.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/identifying-iranians/base.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (2.) image not found
  • Donate link: Please fix this invalid URI: "vahidd.com"
You can look at the official readme.txt

identifying-iranians/iranian_identification.php 85% from 13 tests

The main PHP file in "Identifying Iranians" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("identifying-iranians.php" instead of "iranian_identification.php")

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
Success! There were no dangerous files found in this plugin843 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP66047843

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin