84% collaspible-tree-for-making-categories-10

Code Review | Select Category TreeView

WordPress plugin Select Category TreeView scored84%from 54 tests.

About plugin

  • Plugin page: collaspible-tree-...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.0.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2013
  • Latest release: Oct 13, 2013
  • Number of updates: 6
  • Update frequency: every 4.7 days
  • Top authors: wikiDownload (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Select Category TreeView
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.69 ▼5.28
Dashboard /wp-admin3.32 ▲0.0144.34 ▼4.24
Posts /wp-admin/edit.php3.37 ▲0.0142.43 ▼9.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.97 ▼20.67
Media Library /wp-admin/upload.php3.24 ▲0.0135.74 ▲4.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Select Category TreeView
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.211.54 ▼0.1936.85 ▼14.90
Dashboard /wp-admin2,203 ▲155.91 ▲1.02111.24 ▲10.9541.44 ▼1.55
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0535.41 ▼6.9030.80 ▼7.13
Add New Post /wp-admin/post-new.php1,533 ▼1423.16 ▲4.86654.08 ▲39.0150.46 ▼2.37
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.0296.33 ▼7.0745.96 ▲4.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/collaspible-tree-for-making-categories-10/select-category-treeview.php:18

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === collaspible-tree-for-making-categories-10 === )
The official readme.txt might help

collaspible-tree-for-making-categories-10/select-category-treeview.php 92% from 13 tests

"Select Category TreeView" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("collaspible-tree-for-making-categories-10.php" instead of "select-category-treeview.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
Good job! No executable or dangerous file extensions detected404 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16513292
CSS111081
PHP111931

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.68KB9.75KB▼ 41.55%
images/down.png0.43KB0.39KB▼ 9.07%
images/arrow.png0.22KB0.20KB▼ 6.31%
images/right.png0.49KB0.59KB0.00%