10% blogtext

Code Review | BlogText

WordPress plugin BlogText scored 10% from 54 tests.

About plugin

  • Plugin page: blogtext
  • Plugin version: 0.9.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2011
  • Latest release: Sep 25, 2021
  • Number of updates: 45
  • Update frequency: every 85.8 days
  • Top authors: manski (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active / 4,040 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/admin/settings.php

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.64ms] Passed 4 tests

Server-side resources used by BlogText
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.61 ▼32.97
Dashboard /wp-admin2.05 ▼1.265.35 ▼44.98
Posts /wp-admin/edit.php2.05 ▼1.315.74 ▼42.58
Add New Post /wp-admin/post-new.php2.05 ▼3.845.54 ▼102.01
Media Library /wp-admin/upload.php2.05 ▼1.185.76 ▼31.36
BlogText /wp-admin/options-general.php?page=blogtext_settings2.055.17

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 324 new files
Database: no new tables, 10 new options
New WordPress options
blogtext_version
theysaidso_admin_options
_cache_blogtext_externals_determine_date9
widget_recent-comments
_cache_blogtext_content_loop_9cache_date_
widget_theysaidso_widget
can_compress_scripts
_cache_blogtext_content_loop_9cache_
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for BlogText
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲13913.24 ▼1.141.73 ▲0.0238.00 ▼4.07
Dashboard /wp-admin2,227 ▲365.81 ▲0.9696.01 ▼9.8635.97 ▼8.35
Posts /wp-admin/edit.php2,121 ▲532.04 ▲0.0040.27 ▼0.2137.23 ▲2.10
Add New Post /wp-admin/post-new.php6,485 ▲4,94320.36 ▲2.23946.51 ▲291.1158.40 ▼11.11
Media Library /wp-admin/upload.php1,412 ▲244.14 ▼0.0796.20 ▼2.5846.83 ▲3.70
BlogText /wp-admin/options-general.php?page=blogtext_settings1,1132.0622.5830.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/admin/settings.php
  • The uninstall procedure has failed, leaving 10 options in the database
    • _cache_blogtext_content_loop_9cache_date_
    • widget_theysaidso_widget
    • _cache_blogtext_content_loop_9cache_
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • blogtext_version
    • widget_recent-posts
    • widget_recent-comments
    • _cache_blogtext_externals_determine_date9

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/admin/settings.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/markup/blogtext_markup.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/markup/textmarkup_base.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/markup/PlaceholderManager.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/markup/shortcodes/ImageShortCodeHandler.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/markup/shortcodes/WordpressLinkShortCodeHandler.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/markup/shortcodes/ILinkShortCodeHandler.php
    • > GET request to /wp-admin/options-general.php?page=blogtext_settings
    • > Notice in wp-content/plugins/blogtext/api/commons.php+90
    Undefined index: wp-content/plugins/blogtext/admin/settings-page.php

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/blogtext/admin/editor/codeblock-lang/query.php
  • 2135× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/oracle11.php on line 607
    • > PHP Warning
      Use of undefined constant GESHI_AFTER - assumed 'GESHI_AFTER' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/llvm.php on line 359
    • > PHP Warning
      Use of undefined constant GESHI_BEFORE - assumed 'GESHI_BEFORE' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/dos.php on line 168
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/arm.php on line 3304
    • > PHP Warning
      Use of undefined constant GESHI_NUMBER_HEX_PREFIX_DOLLAR - assumed 'GESHI_NUMBER_HEX_PREFIX_DOLLAR' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/68000devpac.php on line 148
    • > PHP Warning
      Use of undefined constant GESHI_MODIFIERS - assumed 'GESHI_MODIFIERS' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/sas.php on line 236
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/f1.php on line 143
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/racket.php on line 948
    • > PHP Warning
      Use of undefined constant GESHI_NUMBER_OCT_PREFIX - assumed 'GESHI_NUMBER_OCT_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/aimms.php on line 279
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/blogtext/thirdparty/geshi/geshi/lb.php on line 147

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: post, formatting, markup

blogtext/blogtext.php Passed 13 tests

Analyzing the main PHP file in "BlogText" version 0.9.10
100 characters long description:
Allows you to write your posts and pages with an alternative, easy-to-learn, and fast-to-type syntax

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin76,544 lines of code in 318 files:
LanguageFilesBlank linesComment linesLines of code
PHP3022,99516,66575,728
CSS10125211489
JavaScript55394275
SVG10052

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 189)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity22.60
▷ Minimum class complexity1.00
▷ Maximum class complexity635.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity189.00
Code structure
Namespaces3
Interfaces3
Traits0
Classes64
▷ Abstract classes812.50%
▷ Concrete classes5687.50%
▷ Final classes11.79%
Methods514
▷ Static methods10219.84%
▷ Public methods32062.26%
▷ Protected methods10219.84%
▷ Private methods9217.90%
Functions17
▷ Named functions1588.24%
▷ Anonymous functions211.76%
Constants122
▷ Global constants5545.08%
▷ Class constants6754.92%
▷ Public constants67100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected