89% zarehbin

Code Review | ذره بین

WordPress plugin ذره بین scored 89% from 54 tests.

About plugin

  • Plugin page: zarehbin
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2022
  • Latest release: Dec 31, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: zarehbin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.53ms] Passed 4 tests

Server-side resources used by ذره بین
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.02 ▼8.13
Dashboard /wp-admin3.31 ▲0.0042.54 ▼7.46
Posts /wp-admin/edit.php3.36 ▲0.0048.12 ▼0.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.92 ▼17.76
Media Library /wp-admin/upload.php3.23 ▲0.0034.90 ▲2.87

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

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

Browser metrics Passed 4 tests

ذره بین: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.22 ▼1.081.84 ▼0.0037.55 ▼12.41
Dashboard /wp-admin2,206 ▲154.85 ▼0.05111.25 ▼13.7543.86 ▼0.02
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0037.16 ▼3.8334.37 ▲0.86
Add New Post /wp-admin/post-new.php1,514 ▼2817.67 ▼0.44669.20 ▲2.5555.63 ▲4.75
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.1093.45 ▼7.0040.58 ▼2.57

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Screenshots are stored in the /assets directory.), #2 (This is the second screen shot)
  • Tags: No tags were detected
You can look at the official readme.txt

zarehbin/zarehbin-woo-api.php 92% from 13 tests

The main file in "ذره بین" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zarehbin.php" instead of "zarehbin-woo-api.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
Good job! No executable or dangerous file extensions detected179 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23817179

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods225.00%
▷ Protected methods00.00%
▷ Private methods675.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected