83% ts-collections

Code Review | TS Collections

WordPress plugin TS Collections scored83%from 54 tests.

About plugin

  • Plugin page: ts-collections
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.5.2
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: May 18, 2016
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: rktaiwala (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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▲0.90ms] Passed 4 tests

A check of server-side resources used by TS Collections
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1647.77 ▲7.28
Dashboard /wp-admin3.53 ▲0.1851.76 ▼1.00
Posts /wp-admin/edit.php3.58 ▲0.1853.31 ▲5.51
Add New Post /wp-admin/post-new.php6.05 ▲0.1294.13 ▼8.20
Media Library /wp-admin/upload.php3.39 ▲0.1243.46 ▲11.57

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

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

Browser metrics Passed 4 tests

A check of browser resources used by TS Collections
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.30 ▼0.231.99 ▲0.2943.36 ▲1.73
Dashboard /wp-admin2,216 ▲395.58 ▲0.0595.76 ▲5.1942.49 ▲1.44
Posts /wp-admin/edit.php2,118 ▲182.01 ▼0.0136.61 ▲0.7033.37 ▼6.41
Add New Post /wp-admin/post-new.php1,541 ▲1523.21 ▲0.02726.23 ▲90.3673.24 ▲22.27
Media Library /wp-admin/upload.php1,418 ▲154.34 ▲0.13100.20 ▼2.0341.90 ▼4.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/addasynctojs.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/linktwitterusername.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/markcomment.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/removeautolinking.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/phpintextwidget.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/removeurlcomment.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/content-clips/content-clips.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/addasynctojs.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/minimumcommentlength.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ts-collections/classes/addons/jqueryinfooter.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Plugin Screen)
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

ts-collections/tscollections.php 85% from 13 tests

The principal PHP file in "TS Collections" 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 145 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("ts-collections.php" instead of "tscollections.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 plugin2,585 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33993181,003
PHP17348406930
CSS11520652

PHP code Passed 2 tests

This is a short overview 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.31
Average class complexity6.62
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods82
▷ Static methods8097.56%
▷ Public methods82100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/addons/content-clips/js/content-clip.png0.91KB0.71KB▼ 22.14%
images/adminIcon.png0.39KB0.28KB▼ 26.58%
classes/addons/content-clips/images/content-clip.png0.49KB0.36KB▼ 27.52%