84% space-manager

Code Review | Space Manager

WordPress plugin Space Manager scored84%from 54 tests.

About plugin

  • Plugin page: space-manager
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Jan 27, 2012
  • Latest release: Dec 10, 2012
  • Number of updates: 14
  • Update frequency: every 22.7 days
  • Top authors: dan.imbrogno (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼10.31ms] Passed 4 tests

Analyzing server-side resources used by Space Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.00 ▲2.91
Dashboard /wp-admin3.54 ▲0.1952.09 ▼19.28
Posts /wp-admin/edit.php3.59 ▲0.2347.70 ▼1.38
Add New Post /wp-admin/post-new.php6.06 ▲0.1783.98 ▼23.49
Media Library /wp-admin/upload.php3.40 ▲0.1737.55 ▲3.12
Space Manager /wp-admin/options-general.php?page=space_manager3.3730.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_defaultspacemanagerwidget
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Space Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▼0.371.81 ▼0.0244.75 ▲3.10
Dashboard /wp-admin2,196 ▲195.66 ▼0.0187.54 ▼3.1740.11 ▼3.62
Posts /wp-admin/edit.php2,107 ▲42.02 ▼0.0136.94 ▼0.7132.91 ▼1.67
Add New Post /wp-admin/post-new.php1,549 ▲2323.24 ▲5.56641.23 ▼40.4659.32 ▼3.75
Media Library /wp-admin/upload.php1,404 ▲14.23 ▲0.00102.27 ▼2.6345.38 ▲1.92
Space Manager /wp-admin/options-general.php?page=space_manager8162.0225.1928.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_defaultspacemanagerwidget

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

SRP 50% 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
Please fix the following items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/space-manager/php/html/spaces_view.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/space-manager/php/space-manager-widget.class.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/space-manager/php/html/widget_form.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/space-manager/php/space-manager-widget.class.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/space-manager/php/html/zones_view.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SpaceManager' not found in wp-content/plugins/space-manager/space-manager.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SpaceManagerWidget' not found in wp-content/plugins/space-manager/space-manager-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/space-manager/php/html/space_view.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/space-manager/php/space-manager-widget.class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Setup zones to group your spaces logically), #2 (Create spaces within the zones), #3 (Use the built in tinyMCE editor to drop images into your spaces, just like writing a post.), #4 (Display the spaces in any sidebar and customize the appearance)
The official readme.txt might help

space-manager/index.php 92% from 13 tests

"Space Manager" version 1.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("space-manager.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin1,273 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12715311,273

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.29
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes228.57%
▷ Concrete classes571.43%
▷ Final classes00.00%
Methods81
▷ Static methods11.23%
▷ Public methods6985.19%
▷ Protected methods11.23%
▷ Private methods1113.58%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants59
▷ Global constants00.00%
▷ Class constants59100.00%
▷ Public constants59100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.29MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png19.36KB8.68KB▼ 55.19%
screenshot-4.png37.54KB16.93KB▼ 54.92%
screenshot-1.png26.49KB12.73KB▼ 51.96%
screenshot-3.png212.25KB81.09KB▼ 61.79%