93% persian-fake-contents

Code Review | محتوای جعلی فارسی

WordPress plugin محتوای جعلی فارسی scored 93% from 54 tests.

About plugin

  • Plugin page: persian-fake-cont...
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Feb 18, 2021
  • Latest release: Apr 29, 2021
  • Number of updates: 4
  • Update frequency: every 17.5 days
  • Top authors: ehsan957 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 268 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by محتوای جعلی فارسی
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1227.56 ▲4.15
Dashboard /wp-admin3.06 ▲0.0145.24 ▼6.25
Posts /wp-admin/edit.php3.11 ▲0.0142.39 ▼4.40
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.08 ▼572.91
Media Library /wp-admin/upload.php3.01 ▲0.0026.73 ▼8.33

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for محتوای جعلی فارسی
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12715.72 ▲0.1710.75 ▲0.7949.05 ▼1.15
Dashboard /wp-admin2,990 ▲565.88 ▼0.10132.10 ▼27.81106.09 ▼9.95
Posts /wp-admin/edit.php2,759 ▲202.72 ▼0.0068.60 ▲1.9793.21 ▲3.68
Add New Post /wp-admin/post-new.php1,683 ▼18919.12 ▼0.07383.10 ▼8.30107.75 ▼2.59
Media Library /wp-admin/upload.php1,830 ▲235.05 ▲0.03143.82 ▼10.55120.52 ▼6.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/persian-fake-contents/grizzly.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

persian-fake-contents/grizzly.php 85% from 13 tests

The primary PHP file in "محتوای جعلی فارسی" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("persian-fake-contents.php" instead of "grizzly.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Everything looks great! No dangerous files found in this plugin258 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11316258

PHP code Passed 2 tests

Analyzing 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.26
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%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected