84% dastyar-wp

Code Review | Dastyar WP

WordPress plugin Dastyar WP scored84%from 54 tests.

About plugin

  • Plugin page: dastyar-wp
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Oct 11, 2020
  • Latest release: Oct 17, 2020
  • Number of updates: 11
  • Update frequency: every 0.7 days
  • Top authors: matinbeigi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /476 total downloads

Benchmarks

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.04MB] [CPU: ▲7.31ms] Passed 4 tests

Analyzing server-side resources used by Dastyar WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.31 ▲8.58
Dashboard /wp-admin3.34 ▲0.0456.32 ▲8.44
Posts /wp-admin/edit.php3.39 ▲0.0452.83 ▲6.10
Add New Post /wp-admin/post-new.php5.92 ▲0.0499.30 ▲8.17
Media Library /wp-admin/upload.php3.27 ▲0.0444.67 ▲6.51
دستیار وردپرس /wp-admin/options-general.php?page=dastyar-wp3.5540.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Dastyar WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▼0.421.96 ▲0.1742.54 ▼2.99
Dashboard /wp-admin2,199 ▲225.64 ▼0.0383.46 ▼10.9245.09 ▲4.36
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0641.74 ▲4.3040.98 ▲1.77
Add New Post /wp-admin/post-new.php1,539 ▲1123.24 ▲0.05628.10 ▼51.2849.97 ▼17.56
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0796.26 ▼16.9543.05 ▼4.83
دستیار وردپرس /wp-admin/options-general.php?page=dastyar-wp1,0411.9925.4066.01

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/dastyar-wp/templates/option-page.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dastyar-wp/class/mb.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: security, speed

dastyar-wp/index.php 85% from 13 tests

The entry point to "Dastyar WP" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 178 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("dastyar-wp.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected431 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP38830431

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin