94% index-pages

Code Review | Index Pages

WordPress plugin Index Pages scored 94% from 54 tests.

About plugin

  • Plugin page: index-pages
  • Plugin version: 1.3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.7.2
  • WordPress version: 5.8.1
  • First release: Feb 3, 2016
  • Latest release: Apr 29, 2017
  • Number of updates: 10
  • Update frequency: every 45.1 days
  • Top authors: dougwollison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,580 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼148.56ms] Passed 4 tests

A check of server-side resources used by Index Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2133.07 ▲12.61
Dashboard /wp-admin3.15 ▲0.1043.79 ▼6.39
Posts /wp-admin/edit.php3.27 ▲0.1645.70 ▲0.52
Add New Post /wp-admin/post-new.php5.52 ▲0.0991.44 ▼582.40
Media Library /wp-admin/upload.php3.10 ▲0.0932.11 ▼5.98

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Index Pages
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11716.25 ▲0.719.36 ▼1.1045.27 ▼6.16
Dashboard /wp-admin2,967 ▲365.93 ▲0.02135.98 ▼8.29116.89 ▼1.85
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0162.26 ▼4.5492.25 ▲2.61
Add New Post /wp-admin/post-new.php1,615 ▼69422.48 ▲2.71268.51 ▼111.08104.98 ▼5.89
Media Library /wp-admin/upload.php1,810 ▼05.02 ▼0.03139.28 ▼0.67115.12 ▼12.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'IndexPages\\Handler' not found in wp-content/plugins/index-pages/includes/class-indexpages-frontend.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'IndexPages\\Handler' not found in wp-content/plugins/index-pages/includes/class-indexpages-backend.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'IndexPages\\Handler' not found in wp-content/plugins/index-pages/includes/class-indexpages-liaison.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function IndexPages_Autoloader\\plugin_dir_path() in wp-content/plugins/index-pages/includes/autoloader.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 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
4 plugin tags: custom index, index page, custom post type, page for posts

index-pages/index-pages.php Passed 13 tests

The primary PHP file in "Index Pages" version 1.3.0.1 is used by WordPress to initiate all plugin functionality
90 characters long description:
Assign pages as the index page for WordPress custom post types, similar to the Posts Page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin473 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10162735471
Markdown1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity9.83
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes5100.00%
Methods33
▷ Static methods33100.00%
▷ Public methods3296.97%
▷ Protected methods13.03%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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