10% space-remover

Code Review | Space Remover

WordPress plugin Space Remover scored10%from 54 tests.

About plugin

  • Plugin page: space-remover
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 6.3.1
  • First release: Nov 11, 2014
  • Latest release: Dec 21, 2016
  • Number of updates: 29
  • Update frequency: every 31.4 days
  • Top authors: mgwe (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,463 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/space-remover/classes/mgwe_space_remover_class.php+48
    Accessing static property MGWESpaceRemover::$Admin as non static

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.48ms] Passed 4 tests

Server-side resources used by Space Remover
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.94 ▼40.26
Dashboard /wp-admin2.05 ▼1.2610.26 ▼45.17
Posts /wp-admin/edit.php2.05 ▼1.315.19 ▼44.75
Add New Post /wp-admin/post-new.php2.05 ▼3.846.31 ▼83.73
Media Library /wp-admin/upload.php2.05 ▼1.185.14 ▼32.55
MGWE Space Remover /wp-admin/options-general.php?page=MGWESpaceRemover2.055.55

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Space Remover: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.23 ▼0.321.74 ▲0.1544.44 ▼1.89
Dashboard /wp-admin2,205 ▲285.63 ▲0.0383.01 ▼17.4143.05 ▼1.10
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0335.58 ▼1.8933.18 ▼3.68
Add New Post /wp-admin/post-new.php6,236 ▲4,71018.86 ▼4.82933.65 ▲277.9452.94 ▲2.37
Media Library /wp-admin/upload.php1,407 ▲104.38 ▲0.22101.71 ▼29.7944.37 ▼8.63
MGWE Space Remover /wp-admin/options-general.php?page=MGWESpaceRemover8332.0126.8427.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/space-remover/classes/mgwe_space_remover_class.php+48
    Accessing static property MGWESpaceRemover::$Admin as non static
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=MGWESpaceRemover
    • > Notice in wp-content/plugins/space-remover/classes/mgwe_space_remover_class.php+48
    Accessing static property MGWESpaceRemover::$Admin as non static

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/space-remover/space-remover.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MGWESpaceRemover' not found in wp-content/plugins/space-remover/classes/mgwe_space_remover_admin_class.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Space Remover settings page), #2 (Space Remover individual page disabler)
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

space-remover/space-remover.php Passed 13 tests

"Space Remover" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
38 characters long description:
Plugin for removing unnecessary spaces

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin170 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4106140170

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.50
▷ Minimum class complexity8.00
▷ Maximum class complexity23.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.35MB with 0.24MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png99.31KB27.58KB▼ 72.23%
screenshot-2.png255.93KB82.77KB▼ 67.66%