84% teleadmin

Code Review | TeleAdmin

WordPress plugin TeleAdmin scored 84% from 54 tests.

About plugin

  • Plugin page: teleadmin
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2019
  • Latest release: Aug 10, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mariandz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.19ms] Passed 4 tests

Server-side resources used by TeleAdmin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.65 ▲1.38
Dashboard /wp-admin3.36 ▲0.0546.29 ▼4.29
Posts /wp-admin/edit.php3.41 ▲0.0545.36 ▼1.18
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.86 ▼16.65
Media Library /wp-admin/upload.php3.28 ▲0.0539.62 ▲8.28
Chats /wp-admin/admin.php?page=teleadmin-chats3.6737.44
Bots /wp-admin/admin.php?page=teleadmin-bots3.2434.43

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 548 new files
Database: 3 new tables, 7 new options
New tables
teleadmin_messages
teleadmin_chats
teleadmin_bots
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
teleadmin_version
theysaidso_admin_options

Browser metrics Passed 4 tests

TeleAdmin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲11913.23 ▼1.211.93 ▲0.2643.12 ▼6.73
Dashboard /wp-admin2,235 ▲504.87 ▼1.03108.55 ▲6.6342.38 ▲3.78
Posts /wp-admin/edit.php2,121 ▲352.17 ▲0.1640.07 ▲4.0436.23 ▲3.74
Add New Post /wp-admin/post-new.php1,552 ▲1923.09 ▲0.01654.16 ▲32.8849.37 ▼3.41
Media Library /wp-admin/upload.php1,417 ▲264.23 ▼0.0195.30 ▼3.3043.80 ▲1.85
Chats /wp-admin/admin.php?page=teleadmin-chats1,0022.0924.4927.46
Bots /wp-admin/admin.php?page=teleadmin-bots9522.0523.3731.45

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 382× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/teleadmin/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/teleadmin/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/teleadmin/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Tests\\Unit\\TestCase' not found in wp-content/plugins/teleadmin/vendor/longman/telegram-bot/tests/unit/Entities/AudioTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Entities\\Entity' not found in wp-content/plugins/teleadmin/vendor/longman/telegram-bot/src/Entities/ChosenInlineResult.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\DB' not found in wp-content/plugins/teleadmin/vendor/longman/telegram-bot/src/BotanDB.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Longman\\TelegramBot\\Tests\\Unit\\TestCase' not found in wp-content/plugins/teleadmin/vendor/longman/telegram-bot/tests/unit/Entities/ServerResponseTest.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/teleadmin/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/teleadmin/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/teleadmin/vendor/guzzlehttp/psr7/src/Uri.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: telegram, notifications, posts, admin

teleadmin/teleadmin.php Passed 13 tests

The main PHP script in "TeleAdmin" version 1.0.0 is automatically included on every request by WordPress
61 characters long description:
Administrate your WordPress website on the way using Telegram

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
Success! There were no dangerous files found in this plugin38,011 lines of code in 528 files:
LanguageFilesBlank linesComment linesLines of code
PHP4767,16318,89631,854
Markdown251,46004,841
JSON900821
SQL7320206
XML42715160
YAML316074
JavaScript28043
make1409
CSS1003

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.28
Average class complexity7.15
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces39
Interfaces25
Traits4
Classes447
▷ Abstract classes143.13%
▷ Concrete classes43396.87%
▷ Final classes81.85%
Methods2,414
▷ Static methods1666.88%
▷ Public methods1,91679.37%
▷ Protected methods28411.76%
▷ Private methods2148.86%
Functions241
▷ Named functions6928.63%
▷ Anonymous functions17271.37%
Constants120
▷ Global constants65.00%
▷ Class constants11495.00%
▷ Public constants114100.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