10% wp-text-expander

Code Review | WP Text Expander

WordPress plugin WP Text Expander scored10%from 54 tests.

About plugin

  • Plugin page: wp-text-expander
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 19, 2018
  • Latest release: Jun 20, 2018
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: smartfoxes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /748 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-text-expander/wp-text-expander.php+39
    Use of undefined constant WPTextExpander_Settings - assumed 'WPTextExpander_Settings' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.76MB] [CPU: ▼58.18ms] Passed 4 tests

An overview of server-side resources used by WP Text Expander
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.30 ▲4.41
Dashboard /wp-admin2.19 ▼1.156.12 ▼58.38
Posts /wp-admin/edit.php2.19 ▼1.166.65 ▼46.89
Add New Post /wp-admin/post-new.php2.19 ▼3.696.01 ▼98.51
Media Library /wp-admin/upload.php2.19 ▼1.036.46 ▼28.94

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

A short overview of filesystem and database impact
These are issues you should consider
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/wp-text-expander/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_wptextexpander_mytext
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
wptextexpander_mytext_db_version
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Text Expander
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.33 ▼1.032.01 ▲0.2743.98 ▲2.36
Dashboard /wp-admin2,237 ▲314.88 ▲0.03101.68 ▼2.8640.74 ▼6.11
Posts /wp-admin/edit.php2,113 ▲132.04 ▲0.0337.84 ▲0.4339.22 ▲3.12
Add New Post /wp-admin/post-new.php1,545 ▲523.08 ▲4.74672.91 ▲3.0648.23 ▼11.48
Media Library /wp-admin/upload.php1,416 ▲164.27 ▲0.0296.15 ▼10.2448.43 ▲2.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
    • > Warning in wp-content/plugins/wp-text-expander/wp-text-expander.php+39
    Use of undefined constant WPTextExpander_Settings - assumed 'WPTextExpander_Settings' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wptextexpander_mytext
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • wptextexpander_mytext_db_version
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-text-expander/lib/WPTextExpander/ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-text-expander/wp-text-expander.php:31
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-text-expander/lib/WPTextExpander/ListTable.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-text-expander/lib/WPTextExpander/ListTable.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

wp-text-expander/wp-text-expander.php 92% from 13 tests

The principal PHP file in "WP Text Expander" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected430 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4145148430

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.31
Average class complexity16.67
▷ Minimum class complexity5.00
▷ Maximum class complexity36.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods1137.93%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin