83% textile-tools

Code Review | Textile Tools

WordPress plugin Textile Tools scored83%from 54 tests.

About plugin

  • Plugin page: textile-tools
  • Plugin version: 2.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 31, 2020
  • Latest release: Jul 12, 2021
  • Number of updates: 11
  • Update frequency: every 23.2 days
  • Top authors: criptoalfa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /796 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
Installer ran successfully

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

This is a short check of server-side resources used by Textile Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0840.62 ▼0.77
Dashboard /wp-admin3.43 ▲0.0948.21 ▼3.30
Posts /wp-admin/edit.php3.55 ▲0.1547.30 ▼3.18
Add New Post /wp-admin/post-new.php6.01 ▲0.0984.13 ▼35.09
Media Library /wp-admin/upload.php3.36 ▲0.0939.48 ▲0.53
Textile Tools /wp-admin/plugins.php?page=wptextile3.4337.01

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Textile Tools
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11813.40 ▼0.957.61 ▲5.9143.47 ▼2.16
Dashboard /wp-admin2,202 ▲225.67 ▲0.0485.94 ▼0.9639.70 ▼3.15
Posts /wp-admin/edit.php2,107 ▲72.15 ▲0.1336.31 ▼0.5834.92 ▼4.72
Add New Post /wp-admin/post-new.php1,531 ▲523.16 ▲0.08670.70 ▲37.2050.98 ▼7.29
Media Library /wp-admin/upload.php1,404 ▲74.13 ▼0.06141.19 ▲40.0855.54 ▲13.71
Textile Tools /wp-admin/plugins.php?page=wptextile1,4967.89377.0239.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/textile-tools/includes/WPTextilePlugin.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Archive example archive_example.png), #2 (Buckets example buckets_example.png)
You can look at the official readme.txt

textile-tools/textile.php 85% from 13 tests

The main file in "Textile Tools" v. 2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 216 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("textile-tools.php" instead of "textile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,606 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JSON3002,329
TypeScript94083301,985
PHP4133111739
CSS15813347
SVG503173
JavaScript36233

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/archive_example.png60.02KB30.32KB▼ 49.48%
assets/buckets_example.png52.56KB25.79KB▼ 50.93%