83% cms-tree-page-view

Code Review | CMS Tree Page View

WordPress plugin CMS Tree Page View scored83%from 54 tests.

About plugin

  • Plugin page: cms-tree-page-view
  • Plugin version: 1.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.0
  • WordPress version: 6.3.1
  • First release: Mar 31, 2010
  • Latest release: Apr 21, 2023
  • Number of updates: 261
  • Update frequency: every 18.3 days
  • Top authors: eskapism (92.34%)jchristopher (8.05%)

Code review

54 tests

User reviews

354 reviews

Install metrics

70,000+ active /1,464,286 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼4.47ms] Passed 4 tests

A check of server-side resources used by CMS Tree Page View
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2337.13 ▼2.38
Dashboard /wp-admin3.56 ▲0.2150.37 ▼9.49
Posts /wp-admin/edit.php3.65 ▲0.3048.05 ▲5.19
Add New Post /wp-admin/post-new.php6.12 ▲0.2380.01 ▼5.26
Media Library /wp-admin/upload.php3.46 ▲0.2337.55 ▼0.75
CMS Tree Page View /wp-admin/options-general.php?page=cms-tpv-options3.4332.15
Tree View /wp-admin/edit.php?post_type=page&page=cms-tpv-page-page3.4637.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 83 new files
Database: no new tables, 10 new options
New WordPress options
cms_tpv_version
theysaidso_admin_options
cms_tpv_show_annoying_little_box
cms_tpv_options
db_upgraded
can_compress_scripts
widget_recent-comments
cms_tpv_show_promo
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for CMS Tree Page View
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,165 ▲41914.04 ▼0.581.66 ▲0.1730.75 ▼8.65
Dashboard /wp-admin2,574 ▲3975.91 ▲0.26105.97 ▲20.8545.05 ▲6.13
Posts /wp-admin/edit.php2,108 ▲81.96 ▼0.0532.95 ▼5.7132.63 ▼2.16
Add New Post /wp-admin/post-new.php1,532 ▼523.17 ▲4.93665.17 ▲11.5359.49 ▼26.60
Media Library /wp-admin/upload.php1,411 ▲144.23 ▲0.02104.75 ▼16.2945.96 ▼1.58
CMS Tree Page View /wp-admin/options-general.php?page=cms-tpv-options1,0322.3335.0528.52
Tree View /wp-admin/edit.php?post_type=page&page=cms-tpv-page-page1,1852.6749.7529.59

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • cms_tpv_show_annoying_little_box
    • cms_tpv_options
    • cms_tpv_version
    • widget_recent-comments
    • can_compress_scripts
    • cms_tpv_show_promo
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cms-tree-page-view/index.php:49

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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The page tree in action), #2 (Edit, view and even add multiple pages at once!), #3 (Drag-and-drop to rearrange/change the order of the pages.)
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

cms-tree-page-view/index.php 85% from 13 tests

Analyzing the main PHP file in "CMS Tree Page View" version 1.6.8
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 305 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cms-tree-page-view.php" instead of "index.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
No dangerous file extensions were detected10,440 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43605124,951
PO File241,5511,9823,679
PHP24783681,266
CSS310660540
Markdown1304

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions41
▷ Named functions4097.56%
▷ Anonymous functions12.44%
Constants4
▷ Global constants4100.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
11 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/images/lock.png0.73KB0.91KB0.00%
screenshot-2.png56.84KB26.44KB▼ 53.49%
scripts/themes/wordpress/iconsxx.png6.52KB2.11KB▼ 67.66%
styles/images/switch-view-icons.png0.70KB0.69KB▼ 2.09%
images/page_white_text.png0.33KB0.46KB0.00%