68% mongolantern

Code Review | MongoLantern WP

WordPress plugin MongoLantern WP scored 68% from 54 tests.

About plugin

  • Plugin page: mongolantern
  • Plugin version: 1.0.1 - alpha...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 7, 2013
  • Latest release: Jan 7, 2013
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: skall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 799 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼4.96ms] Passed 4 tests

A check of server-side resources used by MongoLantern WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3741.28 ▼18.94
Dashboard /wp-admin3.68 ▲0.3755.73 ▲3.54
Posts /wp-admin/edit.php3.73 ▲0.3756.28 ▲3.10
Add New Post /wp-admin/post-new.php6.20 ▲0.31100.36 ▼7.51
Media Library /wp-admin/upload.php3.54 ▲0.3141.80 ▲3.51

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for MongoLantern WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2613.23 ▼1.501.79 ▼0.5142.56 ▼5.50
Dashboard /wp-admin2,209 ▲35.89 ▲0.0898.89 ▼0.7271.36 ▲23.56
Posts /wp-admin/edit.php2,110 ▲182.02 ▲0.0239.61 ▲1.1635.15 ▲5.17
Add New Post /wp-admin/post-new.php1,681 ▲14822.36 ▼0.74727.63 ▲66.7951.19 ▼2.39
Media Library /wp-admin/upload.php1,394 ▲94.19 ▼0.07102.91 ▼16.4974.30 ▲26.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstaller has failed for this plugin, leaving 36 files (0.13MB) in the plugin directory
    • (new file) lib/MongoLantern/Interfaces/MongoLanternInterfaces.php
    • (new file) lib/MongoLantern/Field/MongoLanternField.php
    • (new file) lib/MongoLantern/Interfaces/MongoLanternDocumentInterface.php
    • (new file) lib/MongoLantern/Interfaces/MongoLanternFieldInterface.php
    • (new file) lib/MongoLantern/Indexer/MongoLanternIndexer.php
    • (new file) lib/MongoLantern/Interfaces/MongoLanternIndexerInterface.php
    • (new file) README.txt
    • (new file) lib/MongoLantern/Document/MongoLanternDocument.php
    • (new file) lib/MongoLantern/Benchmark/MongoLanternBenchmark.php
    • (new file) lib/MongoLantern/Interfaces/MongoLanternQueryInterface.php
    • ...
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mongolantern/settings.php
    • > /wp-content/plugins/mongolantern/uninstall.php
    • > /wp-content/plugins/mongolantern/reindex.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mongolantern/mongolantern.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'MongoLanternBase' not found in wp-content/plugins/mongolantern/lib/MongoLantern/Utility/MongoLanternStats.php:38
    • > PHP Fatal error
      require_once(): Failed opening required 'MONGOLANTERN_BASEPATHUtility/MongoLanternVariableHandler.php' (include_path='.:/usr/share/php') in wp-content/plugins/mongolantern/lib/MongoLantern/Loader.php on line 42
    • > PHP Fatal error
      Uncaught Error: Interface 'MongoLanternIndexCSVInterface' not found in wp-content/plugins/mongolantern/lib/MongoLantern/ThirdParty/CSV/MongoLanternIndexCSV.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'MongoLanternBase' not found in wp-content/plugins/mongolantern/lib/MongoLantern/Query/MongoLanternQueryParser.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'MongoLanternBase' not found in wp-content/plugins/mongolantern/lib/MongoLantern/Field/MongoLanternField.php:38
    • > PHP Warning
      Use of undefined constant MONGOLANTERN_BASEPATH - assumed 'MONGOLANTERN_BASEPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mongolantern/lib/MongoLantern/Loader.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'MongoLanternBase' not found in wp-content/plugins/mongolantern/lib/MongoLantern/Indexer/MongoLanternIndexer.php:38
    • > PHP Warning
      require_once(MONGOLANTERN_BASEPATHUtility/MongoLanternVariableHandler.php): failed to open stream: No such file or directory in wp-content/plugins/mongolantern/lib/MongoLantern/Loader.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'MongoLanternBase' not found in wp-content/plugins/mongolantern/lib/MongoLantern/Document/MongoLanternDocument.php:38

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: mongolantern, mongolantern wordpress, mongodb fulltext search engine, open source search server, wordpress fulltext search

mongolantern/mongolantern.php 85% from 13 tests

The primary PHP file in "MongoLantern WP" version 1.0.1 - alpha... is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1.0.1 - alpha...")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 182 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,770 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP316601,3341,770

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.45
Average class complexity15.04
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods129
▷ Static methods2217.05%
▷ Public methods11891.47%
▷ Protected methods53.88%
▷ Private methods64.65%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/logo (copy).png2.99KB1.92KB▼ 35.67%
resources/images/logo.png0.63KB0.62KB▼ 1.40%
resources/images/settings.png0.80KB0.67KB▼ 16.12%