84% telegram-inliner

Code Review | Telegram Inliner

WordPress plugin Telegram Inliner scored84%from 54 tests.

About plugin

  • Plugin page: telegram-inliner
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Jan 30, 2016
  • Latest release: Mar 31, 2016
  • Number of updates: 9
  • Update frequency: every 6.8 days
  • Top authors: websima (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.16ms] Passed 4 tests

Server-side resources used by Telegram Inliner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.98 ▼6.02
Dashboard /wp-admin3.38 ▲0.0352.96 ▼13.13
Posts /wp-admin/edit.php3.50 ▲0.1451.03 ▲1.06
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.80 ▼14.53
Media Library /wp-admin/upload.php3.28 ▲0.0536.14 ▲1.65

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Telegram Inliner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲19614.48 ▲0.041.65 ▼0.1643.55 ▼4.78
Dashboard /wp-admin2,337 ▲1576.09 ▲0.43111.97 ▲21.7588.57 ▲45.75
Posts /wp-admin/edit.php2,283 ▲1833.30 ▲1.2952.70 ▲13.3770.84 ▲33.94
Add New Post /wp-admin/post-new.php1,697 ▲16922.08 ▼1.04763.85 ▲82.8035.09 ▼27.39
Media Library /wp-admin/upload.php1,420 ▲234.02 ▼0.1985.58 ▼29.9466.55 ▲19.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not 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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/telegram-inliner/inliner.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/telegram-inliner/includes/inliner-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/telegram-inliner/includes/inliner-pagetemplate.php:137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/telegram-inliner/includes/inliner-page.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: ajax search, translate ready, telegram, telegram bot, telegram search...

telegram-inliner/inliner.php 92% from 13 tests

The main PHP script in "Telegram Inliner" version 1.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("telegram-inliner.php" instead of "inliner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin459 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP49054396
PO File1255063

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions15
▷ Named functions15100.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
PNG images were not found in this plugin