88% subpages-expand

Code Review | Subpage as Expandible Text Shortcode

WordPress plugin Subpage as Expandible Text Shortcode scored 88% from 54 tests.

About plugin

  • Plugin page: subpages-expand
  • Plugin version: 1.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.6.1
  • WordPress version: 5.8.1
  • First release: Nov 5, 2012
  • Latest release: Sep 12, 2016
  • Number of updates: 37
  • Update frequency: every 45.1 days
  • Top authors: salubrio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,170 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

A check of server-side resources used by Subpage as Expandible Text Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.74 ▲19.07
Dashboard /wp-admin3.07 ▲0.0247.02 ▼0.43
Posts /wp-admin/edit.php3.12 ▲0.0243.74 ▲0.59
Add New Post /wp-admin/post-new.php5.44 ▲0.0094.86 ▼550.92
Media Library /wp-admin/upload.php3.01 ▲0.0134.75 ▼7.56

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subpage as Expandible Text Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,812 ▲21616.54 ▲1.0313.51 ▲5.1347.73 ▲1.99
Dashboard /wp-admin2,973 ▲425.88 ▼0.17143.95 ▼34.89109.15 ▲2.83
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0276.13 ▲8.8988.65 ▼1.39
Add New Post /wp-admin/post-new.php1,683 ▲718.72 ▼0.06407.55 ▲30.39111.13 ▼4.54
Media Library /wp-admin/upload.php1,807 ▼05.07 ▲0.02162.57 ▼7.12114.88 ▼20.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/subpages-expand/js/add_button_editor.js.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subpages-expand/subpages_expand.php:37

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: navigation, text, pages, embedded content, effect...

subpages-expand/subpages_expand.php 92% from 13 tests

Analyzing the main PHP file in "Subpage as Expandible Text Shortcode" version 1.15
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("subpages-expand.php" instead of "subpages_expand.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 detected95 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2175395

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected