83% sgr-nextpage-titles

Code Review | Multipage

WordPress plugin Multipage scored83%from 54 tests.

About plugin

  • Plugin page: sgr-nextpage-titles
  • Plugin version: 1.5.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.7
  • WordPress version: 6.3.1
  • First release: Jun 19, 2012
  • Latest release: Jun 16, 2021
  • Number of updates: 176
  • Update frequency: every 18.7 days
  • Top authors: SGr33n (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

1,000+ active /49,030 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▲2.61ms] Passed 4 tests

This is a short check of server-side resources used by Multipage
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.77 ▼2.94
Dashboard /wp-admin3.37 ▲0.0760.24 ▲7.71
Posts /wp-admin/edit.php3.42 ▲0.0750.02 ▲2.48
Add New Post /wp-admin/post-new.php5.96 ▲0.07103.21 ▲8.99
Media Library /wp-admin/upload.php3.29 ▲0.0639.43 ▲3.19
Multipage Advaced Settings /wp-admin/options-general.php?page=mpp-advanced-settings3.2635.72
Multipage /wp-admin/options-general.php?page=mpp-settings3.2643.99

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
_mpp-postmeta-built
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
_mpp_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Multipage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.24 ▼1.121.84 ▲0.3642.28 ▼0.52
Dashboard /wp-admin2,215 ▲274.85 ▼0.02111.79 ▲5.1839.91 ▼6.10
Posts /wp-admin/edit.php2,095 ▲92.06 ▲0.0238.76 ▲1.1934.53 ▼0.31
Add New Post /wp-admin/post-new.php6,188 ▲4,66719.21 ▼4.03971.33 ▲330.2955.41 ▲2.66
Media Library /wp-admin/upload.php1,391 ▼04.34 ▲0.04101.01 ▲2.3243.85 ▲1.05
Multipage Advaced Settings /wp-admin/options-general.php?page=mpp-advanced-settings9132.0523.5731.68
Multipage /wp-admin/options-general.php?page=mpp-settings1,0272.0722.4030.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • _mpp_db_version
    • widget_recent-posts
    • _mpp-postmeta-built
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sgr-nextpage-titles/sgr-nextpage-titles.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Requires php: Version not formatted correctly
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The settings page.), #2 (The block editor with a subpage block.), #3 (How the post will look like.)
The official readme.txt might help

sgr-nextpage-titles/sgr-nextpage-titles.php 92% from 13 tests

The entry point to "Multipage" version 1.5.12 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)

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 detected1,461 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP204871,3841,282
CSS83474123
JavaScript39756

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity23.75
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods42
▷ Static methods1433.33%
▷ Public methods3276.19%
▷ Protected methods00.00%
▷ Private methods1023.81%
Functions78
▷ Named functions78100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.77MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/tinymce/images/subpagebreak-2x.png2.10KB1.14KB▼ 45.89%
inc/admin/tinymce/images/subpage.png1.04KB0.55KB▼ 47.03%
screenshot-2.png123.96KB52.33KB▼ 57.78%
screenshot-3.png565.06KB204.33KB▼ 63.84%
inc/admin/tinymce/images/subpagebreak.png2.10KB1.14KB▼ 45.89%