74% pssubpages

Code Review | PS Sub-pages

WordPress plugin PS Sub-pages scored 74% from 54 tests.

About plugin

  • Plugin page: pssubpages
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4+
  • WordPress version: 5.8.1
  • First release: Mar 26, 2013
  • Latest release: Oct 25, 2013
  • Number of updates: 12
  • Update frequency: every 39.8 days
  • Top authors: jeff.cave (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 3,678 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.63MB] [CPU: ▼187.62ms] Passed 4 tests

Analyzing server-side resources used by PS Sub-pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.00 ▼0.729.15 ▼12.66
Dashboard /wp-admin2.02 ▼1.0312.87 ▼43.04
Posts /wp-admin/edit.php2.02 ▼1.089.97 ▼34.39
Add New Post /wp-admin/post-new.php2.02 ▼3.4111.08 ▼654.23
Media Library /wp-admin/upload.php2.02 ▼0.9812.92 ▼18.82

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_pssubpages

Browser metrics Passed 4 tests

PS Sub-pages: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.96 ▲0.449.26 ▼2.2547.37 ▼6.60
Dashboard /wp-admin2,964 ▲305.88 ▼0.24187.03 ▲17.94121.51 ▲16.00
Posts /wp-admin/edit.php2,739 ▼02.74 ▲0.0173.15 ▲7.5686.50 ▼2.69
Add New Post /wp-admin/post-new.php1,683 ▼018.81 ▲0.50416.28 ▲24.13116.19 ▲2.06
Media Library /wp-admin/upload.php1,807 ▼35.06 ▲0.03170.87 ▲8.51117.22 ▼11.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in psSubPages is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_pssubpages

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pssubpages/psSubPages.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pssubpages/psSubPages.class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: navigation, child, page, widget

pssubpages/index.php 92% from 13 tests

The entry point to "PS Sub-pages" version 1.0.0 is a PHP file that has certain tags in its header comment area
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 ("pssubpages.php" instead of "index.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
No dangerous file extensions were detected81 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2144381

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin