68% resourcemanager

Code Review | Resourcemanager

WordPress plugin Resourcemanager scored68%from 54 tests.

About plugin

  • Plugin page: resourcemanager
  • Plugin version: 0.8.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 20, 2022
  • Latest release: Nov 22, 2022
  • Number of updates: 19
  • Update frequency: every 9.5 days
  • Top authors: mystryx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /176 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼4.25ms] Passed 4 tests

An overview of server-side resources used by Resourcemanager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2844.03 ▲2.37
Dashboard /wp-admin3.58 ▲0.2848.42 ▼3.54
Posts /wp-admin/edit.php3.70 ▲0.3449.95 ▼4.46
Add New Post /wp-admin/post-new.php6.18 ▲0.2986.79 ▼6.97
Media Library /wp-admin/upload.php3.50 ▲0.2738.91 ▼2.02
Resources /wp-admin/admin.php?page=resourcemanager_resources3.4532.35
Resource Calendar /wp-admin/admin.php?page=resourcemanager_views3.4534.10
Settings /wp-admin/admin.php?page=resourcemanager_settings3.4533.85
About /wp-admin/admin.php?page=resourcemanager_about3.4531.86

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: 2 new tables, 7 new options
New tables
wp_ha_resourcemanager_bookings
wp_ha_resourcemanager_resources
New WordPress options
ha_resourcemanagerdb_version
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Resourcemanager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,032 ▲27114.95 ▲0.5711.86 ▲9.8640.89 ▲0.14
Dashboard /wp-admin2,285 ▲795.49 ▼0.41105.60 ▲3.6444.75 ▲2.56
Posts /wp-admin/edit.php2,168 ▲682.63 ▲0.6340.21 ▼1.2035.47 ▼0.16
Add New Post /wp-admin/post-new.php1,588 ▲3417.99 ▼0.15638.87 ▲2.7340.03 ▼15.50
Media Library /wp-admin/upload.php1,471 ▲714.77 ▲0.5292.13 ▼14.3744.44 ▼1.87
Resources /wp-admin/admin.php?page=resourcemanager_resources9982.6953.5135.38
Resource Calendar /wp-admin/admin.php?page=resourcemanager_views1,0222.6857.1533.61
Settings /wp-admin/admin.php?page=resourcemanager_settings9912.6134.0528.50
About /wp-admin/admin.php?page=resourcemanager_about9352.2929.0026.23

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
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_ha_resourcemanager_bookings
    • wp_ha_resourcemanager_resources
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • ha_resourcemanagerdb_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=resourcemanager_about
    • > Notice in wp-content/plugins/resourcemanager/include/admin_menu.php+110
    Undefined index: _views
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=resourcemanager_about
    • > Notice in wp-content/plugins/resourcemanager/include/admin_menu.php+110
    Undefined index: _settings
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=resourcemanager_settings
    • > Notice in wp-content/plugins/resourcemanager/include/admin_menu.php+110
    Undefined index: _about
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=resourcemanager_about
    • > Notice in wp-content/plugins/resourcemanager/include/admin_menu.php+110
    Undefined index: _resources
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=resourcemanager_settings
    • > Notice in wp-content/plugins/resourcemanager/include/admin_menu.php+159
    Undefined index: type
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=resourcemanager_settings
    • > Notice in wp-content/plugins/resourcemanager/include/admin_menu.php+159
    Undefined index: name

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
Please fix the following items
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/resourcemanager/include/shortcode_handler.php
    • > /wp-content/plugins/resourcemanager/include/admin_menu.php
    • > /wp-content/plugins/resourcemanager/include/setup.php
    • > /wp-content/plugins/resourcemanager/resourcemanager.php
    • > /wp-content/plugins/resourcemanager/include/ajax.php
    • > /wp-content/plugins/resourcemanager/include/db.php
    • > /wp-content/plugins/resourcemanager/include/add_scripts.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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: car manager, resource manager, room manager

resourcemanager/resourcemanager.php Passed 13 tests

The primary PHP file in "Resourcemanager" version 0.8.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Visualizes and manages definable resources in an compact month view.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,190 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript53801171,506
PHP93101021,255
CSS51913159
PO File163101138
JSON20081
HTML113051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.78
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods70
▷ Static methods00.00%
▷ Public methods4158.57%
▷ Protected methods00.00%
▷ Private methods2941.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.58MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
screenshot-2.png95.61KB65.90KB▼ 31.07%
css/images/ui-icons_cc0000_256x240.png4.51KB4.18KB▼ 7.28%
screenshot-3.png78.39KB63.28KB▼ 19.28%
css/images/ui-icons_777620_256x240.png4.51KB4.18KB▼ 7.28%