83% telepost

Code Review | TelePost

WordPress plugin TelePost scored83%from 54 tests.

About plugin

  • Plugin page: telepost
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2023
  • Latest release: Mar 17, 2023
  • Number of updates: 8
  • Update frequency: every 1.9 days
  • Top authors: qanbari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.16ms] Passed 4 tests

An overview of server-side resources used by TelePost
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.92 ▼1.84
Dashboard /wp-admin3.37 ▲0.0751.64 ▲0.38
Posts /wp-admin/edit.php3.43 ▲0.0753.77 ▼1.09
Add New Post /wp-admin/post-new.php5.96 ▲0.0798.36 ▼6.07
Media Library /wp-admin/upload.php3.30 ▲0.0748.12 ▲14.48

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for TelePost
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.25 ▲0.011.73 ▲0.1653.85 ▲14.49
Dashboard /wp-admin2,210 ▲305.68 ▲0.1889.93 ▼6.3342.63 ▲0.42
Posts /wp-admin/edit.php2,112 ▲122.04 ▲0.0439.95 ▲3.0438.38 ▲1.35
Add New Post /wp-admin/post-new.php1,538 ▲1023.03 ▼0.08667.31 ▲28.8261.17 ▼5.84
Media Library /wp-admin/upload.php1,412 ▲184.21 ▼0.03104.47 ▲6.5946.32 ▲3.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/telepost/admin_menu.php:237
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/telepost/telegram-sgs-fetch.php:15

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 90% 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
1 plugin tags: telegram

telepost/telegram-sgs-fetch.php 77% from 13 tests

The entry point to "TelePost" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("telepost.php" instead of "telegram-sgs-fetch.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin332 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36250332

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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