83% ibehroozir

Code Review | iBehrooz.ir

WordPress plugin iBehrooz.ir scored83%from 54 tests.

About plugin

  • Plugin page: ibehroozir
  • Plugin version: 0.0.5
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2022
  • Latest release: Nov 3, 2022
  • Number of updates: 11
  • Update frequency: every 0.7 days
  • Top authors: ibehroozir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.06ms] Passed 4 tests

Analyzing server-side resources used by iBehrooz.ir
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.27 ▲1.37
Dashboard /wp-admin3.40 ▲0.0947.53 ▼2.16
Posts /wp-admin/edit.php3.45 ▲0.0949.84 ▼0.45
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.35 ▼21.05
Media Library /wp-admin/upload.php3.32 ▲0.0939.63 ▼0.56

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for iBehrooz.ir
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.28 ▼0.071.82 ▼0.1336.85 ▼7.06
Dashboard /wp-admin2,207 ▲335.52 ▲0.0184.49 ▼2.8773.40 ▲32.95
Posts /wp-admin/edit.php2,115 ▲151.99 ▼0.0140.41 ▼1.9436.51 ▼0.47
Add New Post /wp-admin/post-new.php1,691 ▲15421.92 ▲3.50763.46 ▲134.9060.15 ▼3.37
Media Library /wp-admin/upload.php1,418 ▲184.16 ▼0.04106.79 ▼0.1875.51 ▲29.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ibehroozir/include/ib.php
    • > /wp-content/plugins/ibehroozir/iBehroozir.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Requires at least: Invalid version format
  • Screenshots: A description for screenshot #1 is missing in ibehroozir/assets to your readme.txt
You can look at the official readme.txt

ibehroozir/iBehroozir.php 92% from 13 tests

The main PHP file in "iBehrooz.ir" ver. 0.0.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ibehroozir.php" instead of "iBehroozir.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin4,519 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS77394,289
PHP31911188
JavaScript6121142

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png1.81KB0.57KB▼ 68.75%
assets/img/copyright.png1.60KB1.42KB▼ 11.33%