10% supra-mongodb-manager

Code Review | Supra MongoDB Manager

WordPress plugin Supra MongoDB Manager scored 10% from 54 tests.

About plugin

  • Plugin page: supra-mongodb-man...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.2.1
  • WordPress version: 5.8.1
  • First release: Oct 11, 2012
  • Latest release: Oct 11, 2012
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: zmijevik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,690 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/supra-mongodb-manager/core/mvc_configuration.php+9
    syntax error, unexpected 'new' (T_NEW)

Server metrics [RAM: ▼0.00MB] [CPU: ▼652.79ms] Passed 4 tests

An overview of server-side resources used by Supra MongoDB Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1247.55 ▲24.92
Dashboard /wp-admin3.06 ▲0.0049.25 ▲6.91
Posts /wp-admin/edit.php3.11 ▲0.0050.53 ▼11.40
Add New Post /wp-admin/post-new.php5.42 ▼0.0296.59 ▼2,603.85
Media Library /wp-admin/upload.php3.00 ▲0.0035.61 ▼2.80

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 111 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Supra MongoDB Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.86 ▼0.1010.69 ▼1.1748.12 ▼9.09
Dashboard /wp-admin2,970 ▲395.91 ▼0.37148.23 ▼57.40113.95 ▲0.08
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0069.48 ▼9.6994.54 ▼9.93
Add New Post /wp-admin/post-new.php1,683 ▲10218.75 ▼0.29434.99 ▲26.56112.50 ▼4.61
Media Library /wp-admin/upload.php1,810 ▲35.02 ▼0.02151.80 ▼14.40124.98 ▼0.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/supra-mongodb-manager/app/views/admin/supra_mongodb_documents/add.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/widget.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/views/index.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/views/_item.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/admin_controller.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/model.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/plugin_loader.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/public_controller.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/plugin.php
    • > /wp-content/plugins/supra-mongodb-manager/core/templates/plugin/app/views/show.php
  • 124× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MvcModel' not found in wp-content/plugins/supra-mongodb-manager/core/models/wp_models/mvc_comment_meta.php:3
    • > PHP Notice
      Undefined variable: collection in wp-content/plugins/supra-mongodb-manager/app/views/admin/supra_mongodb_documents/add.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/supra-mongodb-manager/app/views/admin/supra_mongodb_documents/add.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'MvcModel' not found in wp-content/plugins/supra-mongodb-manager/app/models/supra_mongodb_document.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MvcModel' not found in wp-content/plugins/supra-mongodb-manager/core/models/wp_models/mvc_comment.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/supra-mongodb-manager/app/views/supra_mongodb_collections/_item.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MvcConfiguration' not found in wp-content/plugins/supra-mongodb-manager/app/config/bootstrap.php:2
    • > PHP Notice
      Undefined variable: documents in wp-content/plugins/supra-mongodb-manager/app/views/admin/supra_mongodb_documents/show.php on line 20
    • > PHP Parse error
      syntax error, unexpected 'new' (T_NEW) in wp-content/plugins/supra-mongodb-manager/core/mvc_router.php on line 140
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/supra-mongodb-manager/app/views/admin/supra_mongodb_connections/edit.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Document CRUD Example) image missing
Please take inspiration from this readme.txt

supra-mongodb-manager/supra_mongodb_manager.php 92% from 13 tests

The main PHP file in "Supra MongoDB Manager" ver. 0.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("supra-mongodb-manager.php" instead of "supra_mongodb_manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin6,348 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP1041,3258646,198
JavaScript1471119
CSS15024
Bourne Again Shell1017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.02
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes60
▷ Abstract classes11.67%
▷ Concrete classes5998.33%
▷ Final classes00.00%
Methods407
▷ Static methods102.46%
▷ Public methods29472.24%
▷ Protected methods4811.79%
▷ Private methods6515.97%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/public/css/images/go-back-icon.png1.11KB0.80KB▼ 27.34%
screenshot-1.png64.46KB25.95KB▼ 59.74%