73% pmpr-ir

Code Review | مهندس محمدپور Pmpr

WordPress plugin مهندس محمدپور Pmpr scored73%from 54 tests.

About plugin

  • Plugin page: pmpr-ir
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Jan 4, 2022
  • Latest release: Jul 23, 2023
  • Number of updates: 69
  • Update frequency: every 8.2 days
  • Top authors: pmpr (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /1,843 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.34MB] [CPU: ▲3.48ms] Passed 4 tests

An overview of server-side resources used by مهندس محمدپور Pmpr
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.40 ▲0.9446.13 ▲0.19
Dashboard /wp-admin4.78 ▲1.4858.88 ▲3.43
Posts /wp-admin/edit.php4.82 ▲1.4763.45 ▲12.11
Add New Post /wp-admin/post-new.php7.39 ▲1.5194.61 ▼1.80
Media Library /wp-admin/upload.php4.70 ▲1.4857.99 ▲20.04
Commons  /wp-admin/admin.php?page=pmpr-plg-common4.8449.44
Modules  /wp-admin/admin.php?page=pmpr-plg-module4.9548.55
Customs  /wp-admin/admin.php?page=pmpr-plg-custom4.9544.85
Covers  /wp-admin/admin.php?page=pmpr-plg-cover4.9543.05
Settings /wp-admin/admin.php?page=pmpr-plg-settings4.6646.75

Server storage [IO: ▲5.38MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • You have illegally modified 1 file (0.16KB) outside of "wp-content/plugins/pmpr-ir/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/index.php
Filesystem: 870 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by مهندس محمدپور Pmpr
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.34 ▲0.061.58 ▼0.2748.16 ▲4.10
Dashboard /wp-admin2,274 ▲975.65 ▲0.1286.00 ▼9.2347.83 ▲5.47
Posts /wp-admin/edit.php2,188 ▲882.05 ▲0.0246.36 ▲8.5646.16 ▲10.49
Add New Post /wp-admin/post-new.php6,296 ▲4,76121.44 ▼1.63990.41 ▲329.0139.74 ▼8.91
Media Library /wp-admin/upload.php1,485 ▲854.28 ▲0.04112.29 ▼2.5244.23 ▼4.15
Commons  /wp-admin/admin.php?page=pmpr-plg-common1,0102.2041.4948.65
Modules  /wp-admin/admin.php?page=pmpr-plg-module9882.0539.8839.20
Customs  /wp-admin/admin.php?page=pmpr-plg-custom1,0062.0129.4634.35
Covers  /wp-admin/admin.php?page=pmpr-plg-cover1,0091.9927.8231.24
Settings /wp-admin/admin.php?page=pmpr-plg-settings1,1562.0527.1427.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • pmpr-plg-active_components
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following items
  • 328× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/pmpr-ir/vendor/symfony/console/Command/ListCommand.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Question\\Question' not found in wp-content/plugins/pmpr-ir/vendor/symfony/console/Question/ChoiceQuestion.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Command\\BaseCommand' not found in wp-content/plugins/pmpr-ir/vendor/composer/composer/src/Composer/Command/SuggestsCommand.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Console\\Output\\OutputInterface' not found in wp-content/plugins/pmpr-ir/vendor/symfony/console/Output/Output.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Package\\PackageInterface' not found in wp-content/plugins/pmpr-ir/vendor/composer/composer/src/Composer/Package/CompletePackageInterface.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Console\\Output\\OutputInterface' not found in wp-content/plugins/pmpr-ir/vendor/symfony/console/Output/ConsoleOutputInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\DependencyResolver\\Transaction' not found in wp-content/plugins/pmpr-ir/vendor/composer/composer/src/Composer/DependencyResolver/LockTransaction.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/pmpr-ir/vendor/symfony/console/SingleCommandApplication.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Command\\BaseCommand' not found in wp-content/plugins/pmpr-ir/vendor/composer/composer/src/Composer/Command/RunScriptCommand.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Input\\Input' not found in wp-content/plugins/pmpr-ir/vendor/symfony/console/Input/ArgvInput.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: development, wordpress, programming, pmpr

pmpr-ir/pmpr-ir.php 92% from 13 tests

"مهندس محمدپور Pmpr" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("./translation")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/pmpr-ir/vendor/symfony/console/Resources/bin/hiddeninput.exe
102,542 lines of code in 813 files:
LanguageFilesBlank linesComment linesLines of code
PHP67917,25830,77083,624
Markdown753,363010,106
JSON423107,789
PO File2284333717
YAML6583212
Bourne Again Shell1101459
XML12022
SVG40010
CSS2002
JavaScript1011

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 129)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity22.05
▷ Minimum class complexity1.00
▷ Maximum class complexity357.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity129.00
Code structure
Namespaces115
Interfaces72
Traits15
Classes535
▷ Abstract classes315.79%
▷ Concrete classes50494.21%
▷ Final classes489.52%
Methods4,641
▷ Static methods55611.98%
▷ Public methods3,55876.66%
▷ Protected methods48810.51%
▷ Private methods59512.82%
Functions507
▷ Named functions10220.12%
▷ Anonymous functions40579.88%
Constants514
▷ Global constants122.33%
▷ Class constants50297.67%
▷ Public constants42885.26%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
build/img/placeholder.png5.80KB8.22KB0.00%