10% simterm

Code Review | SimTerm

WordPress plugin SimTerm scored10%from 54 tests.

About plugin

  • Plugin page: simterm
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 6.3.1
  • First release: Aug 1, 2016
  • Latest release: Dec 14, 2016
  • Number of updates: 27
  • Update frequency: every 5.2 days
  • Top authors: gasparfm (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /2,712 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/simterm/simterm.php+57
    Non-static method SimTermLoader::Init() should not be called statically

Server metrics [RAM: ▼1.95MB] [CPU: ▼55.56ms] Passed 4 tests

Analyzing server-side resources used by SimTerm
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.32 ▼36.81
Dashboard /wp-admin2.06 ▼1.245.71 ▼48.08
Posts /wp-admin/edit.php2.06 ▼1.295.99 ▼47.31
Add New Post /wp-admin/post-new.php2.06 ▼3.825.48 ▼90.02
Media Library /wp-admin/upload.php2.06 ▼1.175.74 ▼30.96
SimTerm settings /wp-admin/options-general.php?page=simterm-settings2.065.54

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 17 new options
New WordPress options
simterm-default-animated
simterm-command-prepend
widget_recent-posts
can_compress_scripts
simterm-typing-speed
theysaidso_admin_options
simterm-last-delay-time
simterm-default-theme
simterm-window-title
simterm-output-delay-time
...

Browser metrics Passed 4 tests

SimTerm: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.091.75 ▼0.0339.87 ▼6.50
Dashboard /wp-admin2,210 ▲225.79 ▲0.83101.35 ▼13.0039.63 ▼6.22
Posts /wp-admin/edit.php2,096 ▲72.18 ▲0.1738.86 ▼0.3735.09 ▼6.67
Add New Post /wp-admin/post-new.php1,545 ▲1218.43 ▼5.08601.78 ▼80.3762.09 ▲9.44
Media Library /wp-admin/upload.php1,392 ▲74.15 ▼0.12100.94 ▼9.2145.31 ▼1.80
SimTerm settings /wp-admin/options-general.php?page=simterm-settings9592.0623.9932.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/simterm/simterm.php+57
    Non-static method SimTermLoader::Init() should not be called statically
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • simterm-default-delay
    • simterm-window-statusbar
    • widget_theysaidso_widget
    • simterm-transform-chars
    • simterm-command-prepend
    • simterm-typing-speed
    • db_upgraded
    • simterm-last-delay-time
    • simterm-default-theme
    • simterm-type-prepend
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=simterm-settings
    • > Deprecated in wp-content/plugins/simterm/simterm.php+57
    Non-static method SimTermLoader::Init() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simterm-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SimTermLoader::basic_init() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simterm-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SimTermLoader::load_textdomain() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simterm-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SimTermLoader::settingsInit() should not be called statically

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simterm/views/settings/select.php
    • > /wp-content/plugins/simterm/views/live/syt.php
  • 23× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: fieldId in wp-content/plugins/simterm/views/settings/checkbox.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simterm/views/live/syt.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/simterm/views/globalsettings.php:2
    • > PHP Notice
      Undefined variable: fieldId in wp-content/plugins/simterm/views/settings/text.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/simterm/views/settings/checkbox.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simterm/views/live/syt.php on line 5
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/simterm/views/live/syt.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simterm/views/live/syt.php on line 4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/simterm/views/live/syt.php on line 5
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/simterm/views/live/syt.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === simterm === )
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

simterm/simterm.php Passed 13 tests

"SimTerm" version 0.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
Simulates terminal input/output for tutorials

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,010 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP128040526
JavaScript3161379
PO File13030101
CSS2004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.60
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods3389.19%
▷ Protected methods12.70%
▷ Private methods38.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png1.13KB1.42KB0.00%
img/icon2.png1.43KB1.86KB0.00%
css/img/ubuntu-icons.png1.88KB1.71KB▼ 9.15%