79% sphere-manager

Code Review | Sphere Manager

WordPress plugin Sphere Manager scored79%from 54 tests.

About plugin

  • Plugin page: sphere-manager
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2017
  • Latest release: Oct 20, 2017
  • Number of updates: 8
  • Update frequency: every 5.8 days
  • Top authors: devmw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,105 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.46ms] Passed 4 tests

An overview of server-side resources used by Sphere Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1537.86 ▼6.40
Dashboard /wp-admin3.33 ▼0.0160.28 ▼9.12
Posts /wp-admin/edit.php3.45 ▲0.0954.82 ▲5.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.69 ▼20.39
Media Library /wp-admin/upload.php3.26 ▲0.0341.28 ▲2.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 40 new files
Database: 2 new tables, 8 new options
New tables
wp_mwsim_deo
wp_mwsim_scene
New WordPress options
widget_recent-posts
mwsim_scene_db_version
db_upgraded
mwsim_deo_db_version
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sphere Manager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.23 ▼1.061.64 ▼0.1245.96 ▼2.98
Dashboard /wp-admin2,240 ▲434.86 ▼0.02104.72 ▼4.9938.94 ▲0.08
Posts /wp-admin/edit.php2,119 ▲192.03 ▲0.0439.96 ▲2.3638.13 ▲5.18
Add New Post /wp-admin/post-new.php1,570 ▲3618.12 ▼5.07608.14 ▼110.1651.01 ▼9.23
Media Library /wp-admin/upload.php1,413 ▲134.25 ▲0.00119.16 ▲16.4648.26 ▲5.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_mwsim_deo
    • wp_mwsim_scene
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • mwsim_scene_db_version
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • mwsim_deo_db_version
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Screenshot #1 (controller image) image missing
You can look at the official readme.txt

sphere-manager/plugin.php 85% from 13 tests

The main PHP file in "Sphere Manager" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sphere-manager.php" instead of "plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 244 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin4,449 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript93932602,424
PHP5166331,429
SVG100288
CSS5824201
PO File15264107

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.25
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods925.71%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 compressed PNG files occupy 0.93MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bootstrap-colorpicker/alpha-horizontal.png0.54KB1.62KB0.00%
img/bootstrap-colorpicker/hue.png0.49KB0.50KB0.00%
img/bootstrap-colorpicker/hue-horizontal.png0.47KB0.47KB0.00%
screenshot-1.png220.38KB72.02KB▼ 67.32%
img/bootstrap-colorpicker/saturation.png4.05KB5.13KB0.00%