83% mihdan-index-now

Code Review | Index Now

WordPress plugin Index Now scored83%from 54 tests.

About plugin

  • Plugin page: mihdan-index-now
  • Plugin version: 2.6.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Oct 30, 2021
  • Latest release: Nov 21, 2023
  • Number of updates: 36
  • Update frequency: every 20.9 days
  • Top authors: mihdan (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

20,000+ active /150,594 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.83MB] [CPU: ▲7.42ms] 75% from 4 tests

Server-side resources used by Index Now
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 683.55ms on /wp-admin/admin.php?page=mihdan-index-now)
PageMemory (MB)CPU Time (ms)
Home /5.33 ▲1.8748.07 ▲5.07
Dashboard /wp-admin5.13 ▲1.8357.86 ▼1.24
Posts /wp-admin/edit.php5.19 ▲1.8359.01 ▲13.06
Add New Post /wp-admin/post-new.php7.71 ▲1.8394.47 ▲12.80
Media Library /wp-admin/upload.php5.06 ▲1.8351.56 ▲17.62
IndexNow /wp-admin/admin.php?page=mihdan-index-now5.33683.55
Log /wp-admin/admin.php?page=mihdan-index-now-log5.0148.01

Server storage [IO: ▲4.35MB] [DB: ▲0.04MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Index Now
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7414.72 ▲0.581.65 ▼0.2437.96 ▼5.79
Dashboard /wp-admin2,241 ▲735.78 ▲0.1197.95 ▼3.6544.05 ▼2.03
Posts /wp-admin/edit.php2,170 ▲672.50 ▲0.3643.69 ▲0.7134.99 ▼2.28
Add New Post /wp-admin/post-new.php1,571 ▲4523.22 ▼0.02685.15 ▲81.5335.79 ▼11.23
Media Library /wp-admin/upload.php1,458 ▲584.48 ▲0.3397.59 ▼0.3341.29 ▼1.42
IndexNow /wp-admin/admin.php?page=mihdan-index-now4,3702.4242.2787.31
Log /wp-admin/admin.php?page=mihdan-index-now-log1,1022.1731.7625.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 360× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS1' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\phpseclib3\\Crypt\\Common\\BlockCipher' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\Psr\\Log\\AbstractLogger' not found in wp-content/plugins/mihdan-index-now/src/Logger/Logger.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\Auryn\\InjectorException' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/rdlowrey/auryn/lib/InjectionException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php:20
    • > PHP Warning
      require_once(lib/byte_safe_strings.php): failed to open stream: No such file or directory in wp-content/plugins/mihdan-index-now/vendor-prefixed/paragonie/random_compat/psalm-autoload.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\phpseclib3\\Crypt\\DSA' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Mihdan\\IndexNow\\Dependencies\\phpseclib3\\Math\\BigInteger\\Engines\\PHP\\Base' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Mihdan\\IndexNow\\Dependencies\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/mihdan-index-now/vendor-prefixed/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: You can look at the official readme.txt

mihdan-index-now/mihdan-index-now.php Passed 13 tests

The main file in "Index Now" v. 2.6.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
137 characters long description:
IndexNow is a small WordPress Plugin for quickly notifying search engines whenever their website content is created, updated, or deleted.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin55,690 lines of code in 700 files:
LanguageFilesBlank linesComment linesLines of code
PHP6892,30041,17154,103
JSON2001,384
SVG20078
XML30067
YAML25045
Dockerfile18010
Bourne Shell1203

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.28
▷ Minimum class complexity1.00
▷ Maximum class complexity661.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces91
Interfaces41
Traits12
Classes619
▷ Abstract classes21534.73%
▷ Concrete classes40465.27%
▷ Final classes399.65%
Methods3,459
▷ Static methods70020.24%
▷ Public methods2,53573.29%
▷ Protected methods38611.16%
▷ Private methods53815.55%
Functions224
▷ Named functions7332.59%
▷ Anonymous functions15167.41%
Constants680
▷ Global constants9413.82%
▷ Class constants58686.18%
▷ Public constants57798.46%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin