89% sm-cleanup

Code Review | SM Cleanup

WordPress plugin SM Cleanup scored89%from 54 tests.

About plugin

  • Plugin page: sm-cleanup
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2015
  • Latest release: Aug 26, 2015
  • Number of updates: 52
  • Update frequency: every 0.3 days
  • Top authors: SimonJan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.20ms] Passed 4 tests

An overview of server-side resources used by SM Cleanup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1341.93 ▼1.93
Dashboard /wp-admin3.45 ▲0.1052.44 ▼21.42
Posts /wp-admin/edit.php3.56 ▲0.2051.01 ▼3.25
Add New Post /wp-admin/post-new.php6.11 ▲0.22102.77 ▼2.18
Media Library /wp-admin/upload.php3.37 ▲0.1437.14 ▲0.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SM Cleanup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.74 ▲0.571.74 ▼0.3042.84 ▲0.64
Dashboard /wp-admin2,213 ▲224.90 ▼0.91100.09 ▼2.5975.00 ▲37.14
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0138.85 ▲2.4237.12 ▲0.53
Add New Post /wp-admin/post-new.php6,652 ▲5,13822.38 ▲4.69935.44 ▲257.9166.15 ▲11.83
Media Library /wp-admin/upload.php1,401 ▲134.23 ▼0.17105.21 ▲9.3073.61 ▲29.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
1 plugin tags: compress minify css external style attributes minify optimize clean reuse code class seo html css

sm-cleanup/smcleaneup.php 85% from 13 tests

The main PHP file in "SM Cleanup" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 162 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("sm-cleanup.php" instead of "smcleaneup.php")

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
There were no executable files found in this plugin1,211 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP46828773
CSS2271215
JavaScript45116215
HTML1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity41.00
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods12.86%
▷ Public methods3497.14%
▷ Protected methods00.00%
▷ Private methods12.86%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin