79% post-index-helpers

Code Review | Post Index Helpers

WordPress plugin Post Index Helpers scored79%from 54 tests.

About plugin

  • Plugin page: post-index-helpers
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 13, 2010
  • Latest release: Aug 16, 2023
  • Number of updates: 26
  • Update frequency: every 182.0 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Post Index Helpers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.45 ▼0.93
Dashboard /wp-admin3.32 ▼0.0247.06 ▼20.54
Posts /wp-admin/edit.php3.37 ▲0.0249.24 ▼4.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.02 ▼6.39
Media Library /wp-admin/upload.php3.25 ▲0.0235.15 ▼1.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Post Index Helpers
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.24 ▼0.991.93 ▲0.0945.35 ▲4.85
Dashboard /wp-admin2,224 ▲184.86 ▼1.03110.89 ▲4.5739.47 ▼1.05
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.1335.16 ▼0.5833.06 ▼5.43
Add New Post /wp-admin/post-new.php1,545 ▲1423.24 ▲0.16646.75 ▲15.3453.94 ▲0.49
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.0897.21 ▼14.0746.45 ▼2.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-index-helpers/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/post-index-helpers/tests/phpunit/bootstrap.php on line 29
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-index-helpers/tests/phpunit/bootstrap.php on line 29

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: post, loop, coffee2code, template tags, index...

post-index-helpers/post-index-helpers.php Passed 13 tests

The primary PHP file in "Post Index Helpers" version 1.4.3 is used by WordPress to initiate all plugin functionality
100 characters long description:
A variety of template tags related to the index/position of a post within a loop's listing of posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin578 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP4129173345
Markdown4700198
Bourne Shell16221
XML10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods4495.65%
▷ Protected methods00.00%
▷ Private methods24.35%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin