84% wp-nested-pages

Code Review | Nested Pages

WordPress plugin Nested Pages scored84%from 54 tests.

About plugin

  • Plugin page: wp-nested-pages
  • Plugin version: 3.2.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.4
  • WordPress version: 6.3.1
  • First release: Oct 23, 2014
  • Latest release: Nov 3, 2023
  • Number of updates: 351
  • Update frequency: every 9.4 days
  • Top authors: kylephillips (100%)

Code review

54 tests

User reviews

120 reviews

Install metrics

100,000+ active /1,668,751 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.85MB] [CPU: ▲6.25ms] Passed 4 tests

An overview of server-side resources used by Nested Pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.07 ▼0.65
Dashboard /wp-admin4.41 ▲1.1157.97 ▲8.09
Posts /wp-admin/edit.php4.46 ▲1.1055.70 ▲10.76
Add New Post /wp-admin/post-new.php6.99 ▲1.11102.72 ▲11.45
Media Library /wp-admin/upload.php4.33 ▲1.1042.79 ▲6.78
Nested Pages /wp-admin/options-general.php?page=nested-pages-settings4.3240.68
All Pages /wp-admin/admin.php?page=nestedpages4.6660.70

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 245 new files
Database: no new tables, 9 new options
New WordPress options
nestedpages_posttypes
widget_theysaidso_widget
theysaidso_admin_options
nestedpages_version
widget_recent-comments
can_compress_scripts
nestedpages_menusync
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Nested Pages
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5314.16 ▼0.181.78 ▲0.0944.20 ▼1.97
Dashboard /wp-admin2,205 ▲345.52 ▼0.0190.02 ▼14.8143.04 ▼3.59
Posts /wp-admin/edit.php2,110 ▲102.01 ▲0.0032.89 ▼3.3435.83 ▼0.12
Add New Post /wp-admin/post-new.php1,543 ▲1725.31 ▲2.02615.38 ▼45.9474.72 ▲22.34
Media Library /wp-admin/upload.php1,413 ▲224.19 ▲0.0996.67 ▼4.3342.73 ▲1.34
Nested Pages /wp-admin/options-general.php?page=nested-pages-settings1,1502.4241.8937.62
All Pages /wp-admin/admin.php?page=nestedpages2,7012.5647.2640.27

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • nestedpages_version
    • nestedpages_posttypes
    • nestedpages_menusync
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 81× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'NestedPages\\Form\\Listeners\\BaseHandler' not found in wp-content/plugins/wp-nested-pages/app/Form/Listeners/ResetUserPreferences.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\Test\\TestCase' not found in wp-content/plugins/wp-nested-pages/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-nested-pages/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-nested-pages/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'NestedPages\\Entities\\Confirmation\\ConfirmationInterface' not found in wp-content/plugins/wp-nested-pages/app/Entities/Confirmation/LinkDeletedConfirmation.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-nested-pages/app/Views/partials/row-link.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_type_object() in wp-content/plugins/wp-nested-pages/app/Views/forms/link-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-nested-pages/app/Views/partials/list-header.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-nested-pages/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'NestedPages\\Form\\Listeners\\BaseHandler' not found in wp-content/plugins/wp-nested-pages/app/Form/Listeners/BulkEdit.php:9

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: nested, quick edit, admin, pages, page tree...

wp-nested-pages/nestedpages.php 85% from 13 tests

The primary PHP file in "Nested Pages" version 3.2.6 is used by WordPress to initiate all plugin functionality
It is important 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 ("wp-nested-pages.php" instead of "nestedpages.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected17,997 lines of code in 220 files:
LanguageFilesBlank linesComment linesLines of code
PHP1481,3532,6329,082
PO File141,9152,6304,439
JavaScript336405534,129
JSON300138
Markdown1320130
SVG180047
XML12023
YAML1308
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.92
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces20
Interfaces1
Traits0
Classes118
▷ Abstract classes54.24%
▷ Concrete classes11395.76%
▷ Final classes00.00%
Methods519
▷ Static methods91.73%
▷ Public methods32863.20%
▷ Protected methods203.85%
▷ Private methods17132.95%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/datepicker-arrow-prev.png1.05KB0.21KB▼ 79.98%
assets/images/border.png0.91KB0.08KB▼ 90.97%
assets/icon-128x128.png4.68KB2.30KB▼ 50.77%
assets/banner-772x250.png43.06KB16.67KB▼ 61.28%
assets/images/datepicker-arrow-next.png1.05KB0.19KB▼ 81.94%