84% zarincall

Code Review | ZarinCall

WordPress plugin ZarinCall scored 84% from 54 tests.

About plugin

  • Plugin page: zarincall
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 10, 2021
  • Latest release: Sep 19, 2021
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: zarincall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 488 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.01MB] [CPU: ▲0.82ms] Passed 4 tests

Analyzing server-side resources used by ZarinCall
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.00 ▼3.01
Dashboard /wp-admin3.31 ▲0.0144.02 ▲0.82
Posts /wp-admin/edit.php3.37 ▲0.0146.75 ▲8.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.43 ▼0.88
Media Library /wp-admin/upload.php3.24 ▲0.0138.01 ▲6.37

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ZarinCall
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▼013.39 ▼0.263.96 ▲2.2037.51 ▼2.75
Dashboard /wp-admin2,220 ▲115.85 ▲1.0199.10 ▼3.9273.97 ▲36.13
Posts /wp-admin/edit.php2,103 ▲141.99 ▲0.0038.78 ▼0.8540.41 ▲5.24
Add New Post /wp-admin/post-new.php1,677 ▲13522.60 ▲4.55661.26 ▲72.0353.34 ▼7.85
Media Library /wp-admin/upload.php1,390 ▼14.19 ▼0.0294.85 ▼2.5776.67 ▲33.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zarincall/zarincall.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: sms, call

zarincall/zarincall.php 92% from 13 tests

The main file in "ZarinCall" v. 1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 283 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected484 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17534484

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png22.84KB6.82KB▼ 70.12%
images/zarincall_icon.png3.13KB0.48KB▼ 84.61%