79% wpterm

Code Review | WPTerm

WordPress plugin WPTerm scored79%from 54 tests.

About plugin

  • Plugin page: wpterm
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.9
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Jul 24, 2023
  • Number of updates: 42
  • Update frequency: every 54.8 days
  • Top authors: bruandet (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /24,472 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.16MB] [CPU: ▼8.00ms] Passed 4 tests

This is a short check of server-side resources used by WPTerm
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1635.52 ▼2.80
Dashboard /wp-admin3.48 ▲0.1347.40 ▼9.18
Posts /wp-admin/edit.php3.54 ▲0.1749.64 ▲0.36
Add New Post /wp-admin/post-new.php6.06 ▲0.1781.82 ▼19.74
Media Library /wp-admin/upload.php3.41 ▲0.1737.85 ▼0.26
WPTerm /wp-admin/tools.php?page=wpterm3.3731.33

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
wpterm_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WPTerm
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.22 ▼0.341.69 ▲0.0335.68 ▼5.89
Dashboard /wp-admin2,202 ▲255.68 ▲0.0882.32 ▼6.6637.06 ▼5.86
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0943.01 ▲6.9538.48 ▲0.36
Add New Post /wp-admin/post-new.php1,529 ▲323.24 ▼0.10663.89 ▼28.8455.33 ▼0.34
Media Library /wp-admin/upload.php1,407 ▲134.17 ▼0.03106.55 ▲7.4545.11 ▲3.48
WPTerm /wp-admin/tools.php?page=wpterm1,1152.1736.3031.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=wpterm
    • > Notice in wp-content/plugins/wpterm/wpterm.php+729
    Undefined index: php-function

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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpterm/wpterm-help.php
    • > /wp-content/plugins/wpterm/uninstall.php
    • > /wp-content/plugins/wpterm/wpterm.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: unix, shell, command, xterm, bash...

wpterm/wpterm.php Passed 13 tests

The primary PHP file in "WPTerm" version 1.1.9 is used by WordPress to initiate all plugin functionality
59 characters long description:
An xterm-like plugin to run non-interactive shell commands.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,747 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3223179917
PO File1127157424
JavaScript267108377
CSS111327
HTML2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pp.png1.31KB1.25KB▼ 4.19%
images/wpterm-fontplus.png1.38KB0.74KB▼ 46.42%
images/wpterm-fontminus.png1.41KB0.76KB▼ 45.84%
images/wpterm-wrap.png0.48KB0.62KB0.00%