68% sparemin

Code Review | SpareMin

WordPress plugin SpareMin scored 68% from 53 tests.

About plugin

  • Plugin page: sparemin
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 5.8.1
  • First release: Mar 5, 2016
  • Latest release: Nov 9, 2016
  • Number of updates: 16
  • Update frequency: every 17.3 days
  • Top authors: sbruner (87.5%)sparemin (18.75%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 480 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.78MB] [CPU: ▼315.14ms] Passed 4 tests

A check of server-side resources used by SpareMin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.85 ▼0.987.97 ▼25.72
Dashboard /wp-admin1.87 ▼1.186.51 ▼36.71
Posts /wp-admin/edit.php1.87 ▼1.235.47 ▼44.82
Add New Post /wp-admin/post-new.php1.87 ▼3.565.19 ▼1,147.65
Media Library /wp-admin/upload.php1.87 ▼1.145.65 ▼31.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 1 new option
New WordPress options
widget_sparemin

Browser metrics Passed 4 tests

SpareMin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲9215.86 ▲0.407.11 ▼0.5049.53 ▲1.32
Dashboard /wp-admin2,928 ▲785.91 ▲0.08143.15 ▲6.87123.92 ▲19.27
Posts /wp-admin/edit.php2,706 ▼02.69 ▼0.0078.28 ▲12.6895.49 ▲2.63
Add New Post /wp-admin/post-new.php3,670 ▲2,01715.10 ▼3.51405.38 ▲40.03105.34 ▼2.78
Media Library /wp-admin/upload.php1,775 ▲65.03 ▲0.02140.29 ▼12.70116.06 ▼8.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-includes/plugin.php+947
    Undefined offset: 0
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_sparemin

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sparemin/parts/style-Dark.php
    • > /wp-content/plugins/sparemin/parts/style-Light.php
  • 1× 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/sparemin/parts/widget-form.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: sparemin

sparemin/sparemin.php 92% from 13 tests

The entry point to "SpareMin" version 3.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected355 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP99753289
Sass118065
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods12
▷ Static methods541.67%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/poweredbysparemin.png3.58KB2.20KB▼ 38.57%
images/button.png7.50KB3.20KB▼ 57.37%