74% wetext

Code Review | WeText

WordPress plugin WeText scored74%from 54 tests.

About plugin

  • Plugin page: wetext
  • Plugin version: 1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.7-4.9
  • WordPress version: 6.3.1
  • First release: Jul 26, 2018
  • Latest release: Jul 28, 2018
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: wetext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,033 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by WeText
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.59 ▲2.82
Dashboard /wp-admin3.37 ▲0.0746.59 ▲0.22
Posts /wp-admin/edit.php3.42 ▲0.0749.82 ▲2.99
Add New Post /wp-admin/post-new.php5.95 ▲0.0790.62 ▼3.63
Media Library /wp-admin/upload.php3.30 ▲0.0736.11 ▲0.29

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WeText
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.44 ▲0.141.93 ▲0.2344.15 ▲2.49
Dashboard /wp-admin2,224 ▲384.94 ▼0.06100.23 ▼16.4072.89 ▲30.92
Posts /wp-admin/edit.php2,110 ▲242.01 ▼0.0237.87 ▲0.9934.38 ▼3.08
Add New Post /wp-admin/post-new.php1,527 ▼723.07 ▼0.20702.84 ▲13.0854.70 ▼19.92
Media Library /wp-admin/upload.php1,406 ▲184.13 ▼0.07103.45 ▼1.5047.34 ▲1.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wetext/wetext_plugin.php+31
    unlink(): http does not allow unlinking
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/wetext/includes/class_wetext_settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/wetext/includes/left_panel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/wetext/includes/left_panel.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
10 plugin tags: text message, sms, discounts, 2fa, two factor authentication...

wetext/wetext_plugin.php 85% from 13 tests

This is the main PHP file of "WeText" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 416 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wetext.php" instead of "wetext_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,993 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP205331082,803
JavaScript543106834
CSS36246356

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
11 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wetextplugin.png1.39KB0.58KB▼ 58.49%
images/trans.png0.33KB0.09KB▼ 71.22%
images/ticMobile.png22.03KB8.54KB▼ 61.22%
images/sort_desc.png0.15KB0.25KB0.00%
images/double_tick.png1.08KB0.21KB▼ 80.69%