90% post-and-categories-indexer

Code Review | Post Category Indexer

WordPress plugin Post Category Indexer scored90%from 54 tests.

About plugin

  • Plugin page: post-and-categori...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Feb 6, 2021
  • Latest release: Feb 8, 2021
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: brijrajs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /345 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.78ms] Passed 4 tests

Analyzing server-side resources used by Post Category Indexer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0642.55 ▼2.48
Dashboard /wp-admin3.40 ▲0.0650.69 ▼1.74
Posts /wp-admin/edit.php3.45 ▲0.0648.42 ▼4.47
Add New Post /wp-admin/post-new.php5.98 ▲0.0686.05 ▼18.42
Media Library /wp-admin/upload.php3.33 ▲0.0539.36 ▲4.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Post Category Indexer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.82 ▲0.0646.58 ▲3.35
Dashboard /wp-admin2,195 ▲185.62 ▲0.0485.66 ▼2.0440.28 ▼2.60
Posts /wp-admin/edit.php2,097 ▼31.99 ▼0.0436.02 ▼1.9333.09 ▼2.00
Add New Post /wp-admin/post-new.php1,526 ▼223.32 ▲0.10709.60 ▲14.7651.77 ▼7.57
Media Library /wp-admin/upload.php1,400 ▼04.11 ▼0.07108.86 ▼2.3446.44 ▼0.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
3 plugin tags: index, category, post

post-and-categories-indexer/index.php 92% from 13 tests

The primary PHP file in "Post Category Indexer" version 1.1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-and-categories-indexer.php" instead of "index.php")

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 detected2,008 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24333122,008

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.57
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin