72% fast-index

Code Review | Fast Index

WordPress plugin Fast Index scored72%from 54 tests.

About plugin

  • Plugin page: fast-index
  • Plugin version: 1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Feb 11, 2023
  • Latest release: Nov 27, 2023
  • Number of updates: 21
  • Update frequency: every 13.8 days
  • Top authors: cultdevops (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /15,952 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲6.51MB] [CPU: ▲19.71ms] 50% from 4 tests

Analyzing server-side resources used by Fast Index
Please have a look at the following items
  • RAM: The total memory usage must be kept under 10MB (currently 10.54MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: The extra memory usage must be under 5MB (currently 6.51MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.43 ▲6.9773.17 ▲34.61
Dashboard /wp-admin10.54 ▲7.2383.73 ▲33.73
Posts /wp-admin/edit.php10.54 ▲7.1886.51 ▲36.35
Add New Post /wp-admin/post-new.php10.54 ▲4.6570.07 ▼23.27
Media Library /wp-admin/upload.php10.54 ▲7.3166.63 ▲33.76
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius10.5474.02

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 624 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
widget_recent-comments
can_compress_scripts
fs_debug_mode
widget_recent-posts
fs_gdpr
widget_theysaidso_widget
theysaidso_admin_options
fs_active_plugins
db_upgraded

Browser metrics Passed 4 tests

Fast Index: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.54 ▲0.271.70 ▼0.1130.21 ▼13.67
Dashboard /wp-admin2,229 ▲495.54 ▼0.1199.01 ▲1.4147.02 ▲4.34
Posts /wp-admin/edit.php2,138 ▲382.01 ▲0.0641.24 ▲1.1237.64 ▲0.82
Add New Post /wp-admin/post-new.php1,548 ▲1922.86 ▼0.46681.74 ▲89.6344.16 ▼8.60
Media Library /wp-admin/upload.php1,440 ▲434.23 ▲0.07100.04 ▼3.3443.15 ▼3.25
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0891.6726.9831.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/fast-index/index.php+594
    Undefined index: fi_delete
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_accounts
    • theysaidso_admin_options
    • fs_active_plugins
    • fs_gdpr
    • fs_debug_mode
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
  • 141× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Exception' not found in wp-content/plugins/fast-index/helpers/indexingApi/src/Task/Exception.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'DeepCopy\\Matcher\\Matcher' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php:8
    • > PHP Warning
      Class 'Google\\AuthHandler\\Guzzle7AuthHandler' not found in wp-content/plugins/fast-index/helpers/indexingApi/src/aliases.php on line 33
    • > PHP Fatal error
      Uncaught Error: Interface 'DeepCopy\\Filter\\Filter' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/fast-index/view/settings.php:93
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/guzzlehttp/promises/src/AggregateException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Google\\Auth\\FetchAuthTokenInterface' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/google/auth/src/FetchAuthTokenCache.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/fast-index/helpers/indexingApi/vendor/google/auth/src/Credentials/GCECredentials.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in fast-index/assets to your readme.txt
You can look at the official readme.txt

fast-index/index.php 92% from 13 tests

This is the main PHP file of "Fast Index" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fast-index.php" instead of "index.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected84,845 lines of code in 539 files:
LanguageFilesBlank linesComment linesLines of code
PHP44913,12132,99577,633
Markdown361,90105,427
JSON24001,060
JavaScript44659216
YAML7454180
PO File15555177
CSS1418072
HTML15048
XML10019
Dockerfile18010
Bourne Shell1203

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity22.55
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces56
Interfaces39
Traits40
Classes271
▷ Abstract classes197.01%
▷ Concrete classes25292.99%
▷ Final classes3614.29%
Methods2,963
▷ Static methods66922.58%
▷ Public methods2,26876.54%
▷ Protected methods732.46%
▷ Private methods62220.99%
Functions393
▷ Named functions28271.76%
▷ Anonymous functions11128.24%
Constants438
▷ Global constants18842.92%
▷ Class constants25057.08%
▷ Public constants24196.40%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius-sdk/assets/img/fast-index.png9.16KB5.26KB▼ 42.58%
freemius-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
screenshot-2.png41.76KB21.27KB▼ 49.07%
screenshot-3.png38.24KB20.06KB▼ 47.55%
freemius-sdk/assets/img/fast-index-google-indexing.png9.16KB5.26KB▼ 42.58%