84% persian-password

Code Review | Persian Password

WordPress plugin Persian Password scored84%from 54 tests.

About plugin

  • Plugin page: persian-password
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2022
  • Latest release: Jul 29, 2022
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: zareidev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /359 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.58ms] Passed 4 tests

Server-side resources used by Persian Password
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.72 ▲4.77
Dashboard /wp-admin3.33 ▲0.0244.33 ▼5.53
Posts /wp-admin/edit.php3.38 ▲0.0247.52 ▲3.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.33 ▼8.88
Media Library /wp-admin/upload.php3.25 ▲0.0232.77 ▼3.43

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Persian Password: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.22 ▼1.155.01 ▲3.3333.17 ▼7.11
Dashboard /wp-admin2,209 ▲214.90 ▲0.0696.23 ▼6.3038.16 ▼4.52
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0339.53 ▲0.9534.07 ▼0.21
Add New Post /wp-admin/post-new.php1,539 ▲1918.24 ▼5.17600.53 ▼56.9050.18 ▼9.84
Media Library /wp-admin/upload.php1,388 ▲34.26 ▲0.0792.87 ▼6.0239.64 ▼5.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/persian-password/wp-persian-password.php

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: farsi, password, register, persian, login

persian-password/wp-persian-password.php 85% from 13 tests

"Persian Password" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("persian-password.php" instead of "wp-persian-password.php")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6.39" instead of "5.6")

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
Everything looks great! No dangerous files found in this plugin88 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1212375
JavaScript12013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ Global constants1100.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
No PNG files were detected