77% extended-table-of-contents-with-nextpage-support

Code Review | Extended Table of Contents (with nextpage support)

WordPress plugin Extended Table of Contents (with nextpage support) scored77%from 54 tests.

About plugin

  • Plugin page: extended-table-of...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2013
  • Latest release: Jan 6, 2018
  • Number of updates: 22
  • Update frequency: every 75.2 days
  • Top authors: happybooking (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /7,945 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.06MB] [CPU: ▼6.16ms] Passed 4 tests

Analyzing server-side resources used by Extended Table of Contents (with nextpage support)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0025.38 ▼13.32
Dashboard /wp-admin3.39 ▲0.0849.06 ▲4.19
Posts /wp-admin/edit.php3.50 ▲0.1445.73 ▼3.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.75 ▼10.97
Media Library /wp-admin/upload.php3.31 ▲0.0835.99 ▲2.76
Extended-ToC /wp-admin/plugins.php?page=extended_toc3.2530.33

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Extended Table of Contents (with nextpage support): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.45 ▼0.351.93 ▲0.3844.30 ▲2.42
Dashboard /wp-admin2,201 ▲215.52 ▼0.1092.76 ▲8.6636.93 ▼7.07
Posts /wp-admin/edit.php2,106 ▲61.98 ▼0.0435.26 ▼0.7935.09 ▲2.29
Add New Post /wp-admin/post-new.php1,531 ▲523.31 ▼0.22682.15 ▲0.8055.96 ▲1.22
Media Library /wp-admin/upload.php1,403 ▼04.18 ▲0.01110.49 ▲8.8948.52 ▲1.25
Extended-ToC /wp-admin/plugins.php?page=extended_toc1,0732.0329.2128.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=extended_toc
    • > Notice in wp-content/plugins/extended-table-of-contents-with-nextpage-support/extended-toc.php+150
    Undefined variable: msg
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=extended_toc
    • > Notice in wp-content/plugins/extended-table-of-contents-with-nextpage-support/extended-toc.php+158
    Undefined index: tab

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/extended-table-of-contents-with-nextpage-support/extended-toc.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Table of Contents after a preamble), #2 (The options panel found under Plugins > Extended-ToC), #3 (Markup example within the post content)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === extended-table-of-contents-with-nextpage-support === )
You can look at the official readme.txt

extended-table-of-contents-with-nextpage-support/extended-toc.php 85% from 13 tests

The primary PHP file in "Extended Table of Contents (with nextpage support)" version 1.0.0 is used by WordPress to initiate all plugin functionality
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 ("extended-table-of-contents-with-nextpage-support.php" instead of "extended-toc.php")
  • Description: The description should be shorter than 140 characters (currently 379 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin480 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP110365382
CSS213060
PO File1132638

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity67.00
▷ Minimum class complexity67.00
▷ Maximum class complexity67.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1155.00%
▷ Protected methods00.00%
▷ Private methods945.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png19.68KB8.49KB▼ 56.88%
screenshot-1.png71.67KB28.62KB▼ 60.07%
screenshot-3.png44.16KB25.14KB▼ 43.08%